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 QDPSizeChangeProof (⇔)
↳27 TRUE
↳28 PiDP
↳29 UsableRulesProof (⇔)
↳30 PiDP
↳31 PiDPToQDPProof (⇐)
↳32 QDP
↳33 QDPSizeChangeProof (⇔)
↳34 TRUE
↳35 PiDP
↳36 PiDPToQDPProof (⇐)
↳37 QDP
↳38 QDPOrderProof (⇔)
↳39 QDP
↳40 DependencyGraphProof (⇔)
↳41 TRUE
↳42 PrologToPiTRSProof (⇐)
↳43 PiTRS
↳44 DependencyPairsProof (⇔)
↳45 PiDP
↳46 DependencyGraphProof (⇔)
↳47 AND
↳48 PiDP
↳49 UsableRulesProof (⇔)
↳50 PiDP
↳51 PiDPToQDPProof (⇐)
↳52 QDP
↳53 QDPSizeChangeProof (⇔)
↳54 TRUE
↳55 PiDP
↳56 UsableRulesProof (⇔)
↳57 PiDP
↳58 PiDPToQDPProof (⇔)
↳59 QDP
↳60 QDPSizeChangeProof (⇔)
↳61 TRUE
↳62 PiDP
↳63 UsableRulesProof (⇔)
↳64 PiDP
↳65 PiDPToQDPProof (⇔)
↳66 QDP
↳67 QDPSizeChangeProof (⇔)
↳68 TRUE
↳69 PiDP
↳70 UsableRulesProof (⇔)
↳71 PiDP
↳72 PiDPToQDPProof (⇐)
↳73 QDP
↳74 QDPSizeChangeProof (⇔)
↳75 TRUE
↳76 PiDP
↳77 PiDPToQDPProof (⇐)
↳78 QDP
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
QSORT_IN_GA(.(H, L), S) → U1_GA(H, L, S, split_in_ggaa(L, H, A, B))
QSORT_IN_GA(.(H, L), S) → SPLIT_IN_GGAA(L, H, A, B)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U11_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → U10_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, S, B, qsort_in_ga(A, A1))
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A, A1)
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → U3_GA(H, L, S, A1, qsort_in_ga(B, B1))
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B, B1)
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → U4_GA(H, L, S, append_in_gga(A1, .(H, B1), S))
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → APPEND_IN_GGA(A1, .(H, B1), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → U9_GGA(H, L1, L2, L3, append_in_gga(L1, L2, L3))
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
QSORT_IN_GA(.(H, L), S) → U1_GA(H, L, S, split_in_ggaa(L, H, A, B))
QSORT_IN_GA(.(H, L), S) → SPLIT_IN_GGAA(L, H, A, B)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U11_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → U10_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, S, B, qsort_in_ga(A, A1))
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A, A1)
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → U3_GA(H, L, S, A1, qsort_in_ga(B, B1))
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B, B1)
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → U4_GA(H, L, S, append_in_gga(A1, .(H, B1), S))
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → APPEND_IN_GGA(A1, .(H, B1), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → U9_GGA(H, L1, L2, L3, append_in_gga(L1, L2, L3))
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
APPEND_IN_GGA(.(H, L1), L2) → APPEND_IN_GGA(L1, L2)
From the DPs we obtained the following set of size-change graphs:
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_GGAA(X, Xs, Y, le_out_gg) → SPLIT_IN_GGAA(Xs, Y)
SPLIT_IN_GGAA(.(X, Xs), Y) → U5_GGAA(X, Xs, Y, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y) → U7_GGAA(X, Xs, Y, gt_in_gg(X, Y))
U7_GGAA(X, Xs, Y, gt_out_gg) → SPLIT_IN_GGAA(Xs, Y)
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg
U11_gg(le_out_gg) → le_out_gg
U10_gg(gt_out_gg) → gt_out_gg
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U11_gg(x0)
U10_gg(x0)
From the DPs we obtained the following set of size-change graphs:
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, S, B, qsort_in_ga(A, A1))
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B, B1)
QSORT_IN_GA(.(H, L), S) → U1_GA(H, L, S, split_in_ggaa(L, H, A, B))
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A, A1)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
U1_GA(H, split_out_ggaa(A, B)) → U2_GA(H, B, qsort_in_ga(A))
U2_GA(H, B, qsort_out_ga(A1)) → QSORT_IN_GA(B)
QSORT_IN_GA(.(H, L)) → U1_GA(H, split_in_ggaa(L, H))
U1_GA(H, split_out_ggaa(A, B)) → QSORT_IN_GA(A)
qsort_in_ga([]) → qsort_out_ga([])
qsort_in_ga(.(H, L)) → U1_ga(H, split_in_ggaa(L, H))
split_in_ggaa([], Y) → split_out_ggaa([], [])
split_in_ggaa(.(X, Xs), Y) → U5_ggaa(X, Xs, Y, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U11_gg(le_out_gg) → le_out_gg
U5_ggaa(X, Xs, Y, le_out_gg) → U6_ggaa(X, split_in_ggaa(Xs, Y))
split_in_ggaa(.(X, Xs), Y) → U7_ggaa(X, Xs, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg
U10_gg(gt_out_gg) → gt_out_gg
U7_ggaa(X, Xs, Y, gt_out_gg) → U8_ggaa(X, split_in_ggaa(Xs, Y))
U8_ggaa(X, split_out_ggaa(Ls, Bs)) → split_out_ggaa(Ls, .(X, Bs))
U6_ggaa(X, split_out_ggaa(Ls, Bs)) → split_out_ggaa(.(X, Ls), Bs)
U1_ga(H, split_out_ggaa(A, B)) → U2_ga(H, B, qsort_in_ga(A))
U2_ga(H, B, qsort_out_ga(A1)) → U3_ga(H, A1, qsort_in_ga(B))
U3_ga(H, A1, qsort_out_ga(B1)) → U4_ga(append_in_gga(A1, .(H, B1)))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L1), L2) → U9_gga(H, append_in_gga(L1, L2))
U9_gga(H, append_out_gga(L3)) → append_out_gga(.(H, L3))
U4_ga(append_out_gga(S)) → qsort_out_ga(S)
qsort_in_ga(x0)
split_in_ggaa(x0, x1)
le_in_gg(x0, x1)
U11_gg(x0)
U5_ggaa(x0, x1, x2, x3)
gt_in_gg(x0, x1)
U10_gg(x0)
U7_ggaa(x0, x1, x2, x3)
U8_ggaa(x0, x1)
U6_ggaa(x0, x1)
U1_ga(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
append_in_gga(x0, x1)
U9_gga(x0, x1)
U4_ga(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
QSORT_IN_GA(.(H, L)) → U1_GA(H, split_in_ggaa(L, H))
POL(.(x1, x2)) = 1 + x2
POL(0) = 1
POL(QSORT_IN_GA(x1)) = x1
POL(U10_gg(x1)) = 1 + x1
POL(U11_gg(x1)) = 1
POL(U1_GA(x1, x2)) = x2
POL(U1_ga(x1, x2)) = 0
POL(U2_GA(x1, x2, x3)) = x2
POL(U2_ga(x1, x2, x3)) = 0
POL(U3_ga(x1, x2, x3)) = 0
POL(U4_ga(x1)) = 0
POL(U5_ggaa(x1, x2, x3, x4)) = 1 + x2
POL(U6_ggaa(x1, x2)) = 1 + x2
POL(U7_ggaa(x1, x2, x3, x4)) = 1 + x2
POL(U8_ggaa(x1, x2)) = 1 + x2
POL(U9_gga(x1, x2)) = 1
POL([]) = 0
POL(append_in_gga(x1, x2)) = x1 + x2
POL(append_out_gga(x1)) = 0
POL(gt_in_gg(x1, x2)) = 1 + x2
POL(gt_out_gg) = 1
POL(le_in_gg(x1, x2)) = x2
POL(le_out_gg) = 0
POL(qsort_in_ga(x1)) = 0
POL(qsort_out_ga(x1)) = 0
POL(s(x1)) = 1 + x1
POL(split_in_ggaa(x1, x2)) = x1
POL(split_out_ggaa(x1, x2)) = x1 + x2
split_in_ggaa([], Y) → split_out_ggaa([], [])
split_in_ggaa(.(X, Xs), Y) → U5_ggaa(X, Xs, Y, le_in_gg(X, Y))
split_in_ggaa(.(X, Xs), Y) → U7_ggaa(X, Xs, Y, gt_in_gg(X, Y))
U5_ggaa(X, Xs, Y, le_out_gg) → U6_ggaa(X, split_in_ggaa(Xs, Y))
U6_ggaa(X, split_out_ggaa(Ls, Bs)) → split_out_ggaa(.(X, Ls), Bs)
U7_ggaa(X, Xs, Y, gt_out_gg) → U8_ggaa(X, split_in_ggaa(Xs, Y))
U8_ggaa(X, split_out_ggaa(Ls, Bs)) → split_out_ggaa(Ls, .(X, Bs))
U1_GA(H, split_out_ggaa(A, B)) → U2_GA(H, B, qsort_in_ga(A))
U2_GA(H, B, qsort_out_ga(A1)) → QSORT_IN_GA(B)
U1_GA(H, split_out_ggaa(A, B)) → QSORT_IN_GA(A)
qsort_in_ga([]) → qsort_out_ga([])
qsort_in_ga(.(H, L)) → U1_ga(H, split_in_ggaa(L, H))
split_in_ggaa([], Y) → split_out_ggaa([], [])
split_in_ggaa(.(X, Xs), Y) → U5_ggaa(X, Xs, Y, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U11_gg(le_out_gg) → le_out_gg
U5_ggaa(X, Xs, Y, le_out_gg) → U6_ggaa(X, split_in_ggaa(Xs, Y))
split_in_ggaa(.(X, Xs), Y) → U7_ggaa(X, Xs, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg
U10_gg(gt_out_gg) → gt_out_gg
U7_ggaa(X, Xs, Y, gt_out_gg) → U8_ggaa(X, split_in_ggaa(Xs, Y))
U8_ggaa(X, split_out_ggaa(Ls, Bs)) → split_out_ggaa(Ls, .(X, Bs))
U6_ggaa(X, split_out_ggaa(Ls, Bs)) → split_out_ggaa(.(X, Ls), Bs)
U1_ga(H, split_out_ggaa(A, B)) → U2_ga(H, B, qsort_in_ga(A))
U2_ga(H, B, qsort_out_ga(A1)) → U3_ga(H, A1, qsort_in_ga(B))
U3_ga(H, A1, qsort_out_ga(B1)) → U4_ga(append_in_gga(A1, .(H, B1)))
append_in_gga([], L) → append_out_gga(L)
append_in_gga(.(H, L1), L2) → U9_gga(H, append_in_gga(L1, L2))
U9_gga(H, append_out_gga(L3)) → append_out_gga(.(H, L3))
U4_ga(append_out_gga(S)) → qsort_out_ga(S)
qsort_in_ga(x0)
split_in_ggaa(x0, x1)
le_in_gg(x0, x1)
U11_gg(x0)
U5_ggaa(x0, x1, x2, x3)
gt_in_gg(x0, x1)
U10_gg(x0)
U7_ggaa(x0, x1, x2, x3)
U8_ggaa(x0, x1)
U6_ggaa(x0, x1)
U1_ga(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
append_in_gga(x0, x1)
U9_gga(x0, x1)
U4_ga(x0)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
QSORT_IN_GA(.(H, L), S) → U1_GA(H, L, S, split_in_ggaa(L, H, A, B))
QSORT_IN_GA(.(H, L), S) → SPLIT_IN_GGAA(L, H, A, B)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U11_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → U10_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, S, B, qsort_in_ga(A, A1))
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A, A1)
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → U3_GA(H, L, S, A1, qsort_in_ga(B, B1))
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B, B1)
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → U4_GA(H, L, S, append_in_gga(A1, .(H, B1), S))
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → APPEND_IN_GGA(A1, .(H, B1), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → U9_GGA(H, L1, L2, L3, append_in_gga(L1, L2, L3))
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
QSORT_IN_GA(.(H, L), S) → U1_GA(H, L, S, split_in_ggaa(L, H, A, B))
QSORT_IN_GA(.(H, L), S) → SPLIT_IN_GGAA(L, H, A, B)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U11_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → U10_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_GGAA(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, S, B, qsort_in_ga(A, A1))
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A, A1)
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → U3_GA(H, L, S, A1, qsort_in_ga(B, B1))
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B, B1)
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → U4_GA(H, L, S, append_in_gga(A1, .(H, B1), S))
U3_GA(H, L, S, A1, qsort_out_ga(B, B1)) → APPEND_IN_GGA(A1, .(H, B1), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → U9_GGA(H, L1, L2, L3, append_in_gga(L1, L2, L3))
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
APPEND_IN_GGA(.(H, L1), L2, .(H, L3)) → APPEND_IN_GGA(L1, L2, L3)
APPEND_IN_GGA(.(H, L1), L2) → APPEND_IN_GGA(L1, L2)
From the DPs we obtained the following set of size-change graphs:
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
U5_GGAA(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
SPLIT_IN_GGAA(.(X, Xs), Y, .(X, Ls), Bs) → U5_GGAA(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y, Ls, .(X, Bs)) → U7_GGAA(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
U7_GGAA(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y, Ls, Bs)
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U5_GGAA(X, Xs, Y, le_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y)
SPLIT_IN_GGAA(.(X, Xs), Y) → U5_GGAA(X, Xs, Y, le_in_gg(X, Y))
SPLIT_IN_GGAA(.(X, Xs), Y) → U7_GGAA(X, Xs, Y, gt_in_gg(X, Y))
U7_GGAA(X, Xs, Y, gt_out_gg(X, Y)) → SPLIT_IN_GGAA(Xs, Y)
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U11_gg(x0, x1, x2)
U10_gg(x0, x1, x2)
From the DPs we obtained the following set of size-change graphs:
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, S, B, qsort_in_ga(A, A1))
U2_GA(H, L, S, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B, B1)
QSORT_IN_GA(.(H, L), S) → U1_GA(H, L, S, split_in_ggaa(L, H, A, B))
U1_GA(H, L, S, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A, A1)
qsort_in_ga([], []) → qsort_out_ga([], [])
qsort_in_ga(.(H, L), S) → U1_ga(H, L, S, split_in_ggaa(L, H, A, B))
split_in_ggaa([], Y, [], []) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y, .(X, Ls), Bs) → U5_ggaa(X, Xs, Y, Ls, Bs, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, Ls, Bs, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
split_in_ggaa(.(X, Xs), Y, Ls, .(X, Bs)) → U7_ggaa(X, Xs, Y, Ls, Bs, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, Ls, Bs, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, Ls, Bs, split_in_ggaa(Xs, Y, Ls, Bs))
U8_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, Ls, Bs, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, S, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, S, B, qsort_in_ga(A, A1))
U2_ga(H, L, S, B, qsort_out_ga(A, A1)) → U3_ga(H, L, S, A1, qsort_in_ga(B, B1))
U3_ga(H, L, S, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, S, append_in_gga(A1, .(H, B1), S))
append_in_gga([], L, L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2, .(H, L3)) → U9_gga(H, L1, L2, L3, append_in_gga(L1, L2, L3))
U9_gga(H, L1, L2, L3, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, S, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
U1_GA(H, L, split_out_ggaa(L, H, A, B)) → U2_GA(H, L, B, qsort_in_ga(A))
U2_GA(H, L, B, qsort_out_ga(A, A1)) → QSORT_IN_GA(B)
QSORT_IN_GA(.(H, L)) → U1_GA(H, L, split_in_ggaa(L, H))
U1_GA(H, L, split_out_ggaa(L, H, A, B)) → QSORT_IN_GA(A)
qsort_in_ga([]) → qsort_out_ga([], [])
qsort_in_ga(.(H, L)) → U1_ga(H, L, split_in_ggaa(L, H))
split_in_ggaa([], Y) → split_out_ggaa([], Y, [], [])
split_in_ggaa(.(X, Xs), Y) → U5_ggaa(X, Xs, Y, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U11_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(Y)) → le_out_gg(0, s(Y))
le_in_gg(0, 0) → le_out_gg(0, 0)
U11_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_ggaa(X, Xs, Y, le_out_gg(X, Y)) → U6_ggaa(X, Xs, Y, split_in_ggaa(Xs, Y))
split_in_ggaa(.(X, Xs), Y) → U7_ggaa(X, Xs, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), s(Y)) → U10_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), 0) → gt_out_gg(s(X), 0)
U10_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U7_ggaa(X, Xs, Y, gt_out_gg(X, Y)) → U8_ggaa(X, Xs, Y, split_in_ggaa(Xs, Y))
U8_ggaa(X, Xs, Y, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, Ls, .(X, Bs))
U6_ggaa(X, Xs, Y, split_out_ggaa(Xs, Y, Ls, Bs)) → split_out_ggaa(.(X, Xs), Y, .(X, Ls), Bs)
U1_ga(H, L, split_out_ggaa(L, H, A, B)) → U2_ga(H, L, B, qsort_in_ga(A))
U2_ga(H, L, B, qsort_out_ga(A, A1)) → U3_ga(H, L, A1, qsort_in_ga(B))
U3_ga(H, L, A1, qsort_out_ga(B, B1)) → U4_ga(H, L, append_in_gga(A1, .(H, B1)))
append_in_gga([], L) → append_out_gga([], L, L)
append_in_gga(.(H, L1), L2) → U9_gga(H, L1, L2, append_in_gga(L1, L2))
U9_gga(H, L1, L2, append_out_gga(L1, L2, L3)) → append_out_gga(.(H, L1), L2, .(H, L3))
U4_ga(H, L, append_out_gga(A1, .(H, B1), S)) → qsort_out_ga(.(H, L), S)
qsort_in_ga(x0)
split_in_ggaa(x0, x1)
le_in_gg(x0, x1)
U11_gg(x0, x1, x2)
U5_ggaa(x0, x1, x2, x3)
gt_in_gg(x0, x1)
U10_gg(x0, x1, x2)
U7_ggaa(x0, x1, x2, x3)
U8_ggaa(x0, x1, x2, x3)
U6_ggaa(x0, x1, x2, x3)
U1_ga(x0, x1, x2)
U2_ga(x0, x1, x2, x3)
U3_ga(x0, x1, x2, x3)
append_in_gga(x0, x1)
U9_gga(x0, x1, x2, x3)
U4_ga(x0, x1, x2)