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 UsableRulesProof (⇔)
↳16 PiDP
↳17 PiDPToQDPProof (⇐)
↳18 QDP
↳19 QDPSizeChangeProof (⇔)
↳20 TRUE
↳21 PiDP
↳22 UsableRulesProof (⇔)
↳23 PiDP
↳24 PiDPToQDPProof (⇐)
↳25 QDP
↳26 MRRProof (⇔)
↳27 QDP
↳28 PisEmptyProof (⇔)
↳29 TRUE
↳30 PrologToPiTRSProof (⇐)
↳31 PiTRS
↳32 DependencyPairsProof (⇔)
↳33 PiDP
↳34 DependencyGraphProof (⇔)
↳35 AND
↳36 PiDP
↳37 UsableRulesProof (⇔)
↳38 PiDP
↳39 PiDPToQDPProof (⇐)
↳40 QDP
↳41 QDPSizeChangeProof (⇔)
↳42 TRUE
↳43 PiDP
↳44 UsableRulesProof (⇔)
↳45 PiDP
↳46 PiDPToQDPProof (⇐)
↳47 QDP
↳48 QDPSizeChangeProof (⇔)
↳49 TRUE
↳50 PiDP
↳51 UsableRulesProof (⇔)
↳52 PiDP
↳53 PiDPToQDPProof (⇐)
↳54 QDP
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
PERM_IN_GA(Xs, cons(X, Ys)) → AP1_IN_AAG(X1s, cons(X, X2s), Xs)
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → U1_AAG(H, X, Y, Z, ap1_in_aag(X, Y, Z))
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → AP2_IN_GGA(X1s, X2s, Zs)
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → U2_GGA(H, X, Y, Z, ap2_in_gga(X, Y, Z))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_GA(Xs, X, Ys, perm_in_ga(Zs, Ys))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
PERM_IN_GA(Xs, cons(X, Ys)) → AP1_IN_AAG(X1s, cons(X, X2s), Xs)
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → U1_AAG(H, X, Y, Z, ap1_in_aag(X, Y, Z))
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → AP2_IN_GGA(X1s, X2s, Zs)
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → U2_GGA(H, X, Y, Z, ap2_in_gga(X, Y, Z))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_GA(Xs, X, Ys, perm_in_ga(Zs, Ys))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
AP2_IN_GGA(cons(X), Y) → AP2_IN_GGA(X, Y)
From the DPs we obtained the following set of size-change graphs:
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
AP1_IN_AAG(cons(Z)) → AP1_IN_AAG(Z)
From the DPs we obtained the following set of size-change graphs:
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_GA(ap1_out_aag(X1s, cons(X2s))) → U4_GA(ap2_in_gga(X1s, X2s))
U4_GA(ap2_out_gga(Zs)) → PERM_IN_GA(Zs)
PERM_IN_GA(Xs) → U3_GA(ap1_in_aag(Xs))
ap2_in_gga(nil, X) → ap2_out_gga(X)
ap2_in_gga(cons(X), Y) → U2_gga(ap2_in_gga(X, Y))
ap1_in_aag(X) → ap1_out_aag(nil, X)
ap1_in_aag(cons(Z)) → U1_aag(ap1_in_aag(Z))
U2_gga(ap2_out_gga(Z)) → ap2_out_gga(cons(Z))
U1_aag(ap1_out_aag(X, Y)) → ap1_out_aag(cons(X), Y)
ap2_in_gga(x0, x1)
ap1_in_aag(x0)
U2_gga(x0)
U1_aag(x0)
U3_GA(ap1_out_aag(X1s, cons(X2s))) → U4_GA(ap2_in_gga(X1s, X2s))
U4_GA(ap2_out_gga(Zs)) → PERM_IN_GA(Zs)
PERM_IN_GA(Xs) → U3_GA(ap1_in_aag(Xs))
ap2_in_gga(nil, X) → ap2_out_gga(X)
ap1_in_aag(X) → ap1_out_aag(nil, X)
POL(PERM_IN_GA(x1)) = 2 + x1
POL(U1_aag(x1)) = 5 + x1
POL(U2_gga(x1)) = 5 + x1
POL(U3_GA(x1)) = x1
POL(U4_GA(x1)) = x1
POL(ap1_in_aag(x1)) = 1 + x1
POL(ap1_out_aag(x1, x2)) = x1 + x2
POL(ap2_in_gga(x1, x2)) = 4 + x1 + x2
POL(ap2_out_gga(x1)) = 3 + x1
POL(cons(x1)) = 5 + x1
POL(nil) = 0
ap2_in_gga(cons(X), Y) → U2_gga(ap2_in_gga(X, Y))
ap1_in_aag(cons(Z)) → U1_aag(ap1_in_aag(Z))
U2_gga(ap2_out_gga(Z)) → ap2_out_gga(cons(Z))
U1_aag(ap1_out_aag(X, Y)) → ap1_out_aag(cons(X), Y)
ap2_in_gga(x0, x1)
ap1_in_aag(x0)
U2_gga(x0)
U1_aag(x0)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
PERM_IN_GA(Xs, cons(X, Ys)) → AP1_IN_AAG(X1s, cons(X, X2s), Xs)
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → U1_AAG(H, X, Y, Z, ap1_in_aag(X, Y, Z))
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → AP2_IN_GGA(X1s, X2s, Zs)
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → U2_GGA(H, X, Y, Z, ap2_in_gga(X, Y, Z))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_GA(Xs, X, Ys, perm_in_ga(Zs, Ys))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
PERM_IN_GA(Xs, cons(X, Ys)) → AP1_IN_AAG(X1s, cons(X, X2s), Xs)
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → U1_AAG(H, X, Y, Z, ap1_in_aag(X, Y, Z))
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → AP2_IN_GGA(X1s, X2s, Zs)
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → U2_GGA(H, X, Y, Z, ap2_in_gga(X, Y, Z))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_GA(Xs, X, Ys, perm_in_ga(Zs, Ys))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
AP2_IN_GGA(cons(H, X), Y, cons(H, Z)) → AP2_IN_GGA(X, Y, Z)
AP2_IN_GGA(cons(X), Y) → AP2_IN_GGA(X, Y)
From the DPs we obtained the following set of size-change graphs:
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
AP1_IN_AAG(cons(H, X), Y, cons(H, Z)) → AP1_IN_AAG(X, Y, Z)
AP1_IN_AAG(cons(Z)) → AP1_IN_AAG(Z)
From the DPs we obtained the following set of size-change graphs:
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
perm_in_ga(nil, nil) → perm_out_ga(nil, nil)
perm_in_ga(Xs, cons(X, Ys)) → U3_ga(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_ga(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_ga(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U4_ga(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → U5_ga(Xs, X, Ys, perm_in_ga(Zs, Ys))
U5_ga(Xs, X, Ys, perm_out_ga(Zs, Ys)) → perm_out_ga(Xs, cons(X, Ys))
U3_GA(Xs, X, Ys, ap1_out_aag(X1s, cons(X, X2s), Xs)) → U4_GA(Xs, X, Ys, X1s, X2s, ap2_in_gga(X1s, X2s, Zs))
U4_GA(Xs, X, Ys, X1s, X2s, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs, Ys)
PERM_IN_GA(Xs, cons(X, Ys)) → U3_GA(Xs, X, Ys, ap1_in_aag(X1s, cons(X, X2s), Xs))
ap2_in_gga(nil, X, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(H, X), Y, cons(H, Z)) → U2_gga(H, X, Y, Z, ap2_in_gga(X, Y, Z))
ap1_in_aag(nil, X, X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(H, X), Y, cons(H, Z)) → U1_aag(H, X, Y, Z, ap1_in_aag(X, Y, Z))
U2_gga(H, X, Y, Z, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(H, X), Y, cons(H, Z))
U1_aag(H, X, Y, Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(H, X), Y, cons(H, Z))
U3_GA(Xs, ap1_out_aag(X1s, cons(X2s), Xs)) → U4_GA(Xs, ap2_in_gga(X1s, X2s))
U4_GA(Xs, ap2_out_gga(X1s, X2s, Zs)) → PERM_IN_GA(Zs)
PERM_IN_GA(Xs) → U3_GA(Xs, ap1_in_aag(Xs))
ap2_in_gga(nil, X) → ap2_out_gga(nil, X, X)
ap2_in_gga(cons(X), Y) → U2_gga(X, Y, ap2_in_gga(X, Y))
ap1_in_aag(X) → ap1_out_aag(nil, X, X)
ap1_in_aag(cons(Z)) → U1_aag(Z, ap1_in_aag(Z))
U2_gga(X, Y, ap2_out_gga(X, Y, Z)) → ap2_out_gga(cons(X), Y, cons(Z))
U1_aag(Z, ap1_out_aag(X, Y, Z)) → ap1_out_aag(cons(X), Y, cons(Z))
ap2_in_gga(x0, x1)
ap1_in_aag(x0)
U2_gga(x0, x1, x2)
U1_aag(x0, x1)