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 UsableRulesReductionPairsProof (⇔)
↳20 QDP
↳21 DependencyGraphProof (⇔)
↳22 TRUE
↳23 PiDP
↳24 UsableRulesProof (⇔)
↳25 PiDP
↳26 PiDPToQDPProof (⇐)
↳27 QDP
↳28 NonTerminationProof (⇔)
↳29 FALSE
↳30 PiDP
↳31 UsableRulesProof (⇔)
↳32 PiDP
↳33 PiDPToQDPProof (⇐)
↳34 QDP
↳35 QDPSizeChangeProof (⇔)
↳36 TRUE
↳37 PrologToPiTRSProof (⇐)
↳38 PiTRS
↳39 DependencyPairsProof (⇔)
↳40 PiDP
↳41 DependencyGraphProof (⇔)
↳42 AND
↳43 PiDP
↳44 UsableRulesProof (⇔)
↳45 PiDP
↳46 PiDPToQDPProof (⇔)
↳47 QDP
↳48 QDPSizeChangeProof (⇔)
↳49 TRUE
↳50 PiDP
↳51 UsableRulesProof (⇔)
↳52 PiDP
↳53 PiDPToQDPProof (⇔)
↳54 QDP
↳55 MRRProof (⇔)
↳56 QDP
↳57 DependencyGraphProof (⇔)
↳58 TRUE
↳59 PiDP
↳60 UsableRulesProof (⇔)
↳61 PiDP
↳62 PiDPToQDPProof (⇐)
↳63 QDP
↳64 NonTerminationProof (⇔)
↳65 FALSE
↳66 PiDP
↳67 UsableRulesProof (⇔)
↳68 PiDP
↳69 PiDPToQDPProof (⇐)
↳70 QDP
↳71 QDPSizeChangeProof (⇔)
↳72 TRUE
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
SLOWSORT_IN_AG(X, Y) → U1_AG(X, Y, perm_in_ag(X, Y))
SLOWSORT_IN_AG(X, Y) → PERM_IN_AG(X, Y)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → DELETE_IN_GAA(U, .(X, Y), Z)
DELETE_IN_GAA(X, .(Y, Z), W) → U7_GAA(X, Y, Z, W, delete_in_gaa(X, Z, W))
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_AG(X, Y, U, V, perm_in_ag(Z, V))
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
U1_AG(X, Y, perm_out_ag(X, Y)) → U2_AG(X, Y, sorted_in_g(Y))
U1_AG(X, Y, perm_out_ag(X, Y)) → SORTED_IN_G(Y)
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
SORTED_IN_G(.(X, .(Y, Z))) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U8_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U3_G(X, Y, Z, le_out_gg(X, Y)) → U4_G(X, Y, Z, sorted_in_g(.(Y, Z)))
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
SLOWSORT_IN_AG(X, Y) → U1_AG(X, Y, perm_in_ag(X, Y))
SLOWSORT_IN_AG(X, Y) → PERM_IN_AG(X, Y)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → DELETE_IN_GAA(U, .(X, Y), Z)
DELETE_IN_GAA(X, .(Y, Z), W) → U7_GAA(X, Y, Z, W, delete_in_gaa(X, Z, W))
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_AG(X, Y, U, V, perm_in_ag(Z, V))
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
U1_AG(X, Y, perm_out_ag(X, Y)) → U2_AG(X, Y, sorted_in_g(Y))
U1_AG(X, Y, perm_out_ag(X, Y)) → SORTED_IN_G(Y)
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
SORTED_IN_G(.(X, .(Y, Z))) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U8_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U3_G(X, Y, Z, le_out_gg(X, Y)) → U4_G(X, Y, Z, sorted_in_g(.(Y, Z)))
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
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:
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_G(Y, Z, le_out_gg) → SORTED_IN_G(.(Y, Z))
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U8_gg(le_out_gg) → le_out_gg
le_in_gg(x0, x1)
U8_gg(x0)
The following rules are removed from R:
U3_G(Y, Z, le_out_gg) → SORTED_IN_G(.(Y, Z))
Used ordering: POLO with Polynomial interpretation [POLO]:
le_in_gg(s(X), s(Y)) → U8_gg(le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg
le_in_gg(0, 0) → le_out_gg
U8_gg(le_out_gg) → le_out_gg
POL(.(x1, x2)) = x1 + 2·x2
POL(0) = 1
POL(SORTED_IN_G(x1)) = x1
POL(U3_G(x1, x2, x3)) = x1 + 2·x2 + x3
POL(U8_gg(x1)) = 1 + x1
POL(le_in_gg(x1, x2)) = x1 + x2
POL(le_out_gg) = 2
POL(s(x1)) = 1 + 2·x1
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(Y, Z, le_in_gg(X, Y))
le_in_gg(x0, x1)
U8_gg(x0)
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
DELETE_IN_GAA(X) → DELETE_IN_GAA(X)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_AG(V, delete_out_gaa) → PERM_IN_AG(V)
PERM_IN_AG(.(U, .(V, []))) → U5_AG(V, delete_in_gaa(U))
delete_in_gaa(X) → delete_out_gaa
delete_in_gaa(X) → U7_gaa(delete_in_gaa(X))
U7_gaa(delete_out_gaa) → delete_out_gaa
delete_in_gaa(x0)
U7_gaa(x0)
From the DPs we obtained the following set of size-change graphs:
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
SLOWSORT_IN_AG(X, Y) → U1_AG(X, Y, perm_in_ag(X, Y))
SLOWSORT_IN_AG(X, Y) → PERM_IN_AG(X, Y)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → DELETE_IN_GAA(U, .(X, Y), Z)
DELETE_IN_GAA(X, .(Y, Z), W) → U7_GAA(X, Y, Z, W, delete_in_gaa(X, Z, W))
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_AG(X, Y, U, V, perm_in_ag(Z, V))
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
U1_AG(X, Y, perm_out_ag(X, Y)) → U2_AG(X, Y, sorted_in_g(Y))
U1_AG(X, Y, perm_out_ag(X, Y)) → SORTED_IN_G(Y)
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
SORTED_IN_G(.(X, .(Y, Z))) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U8_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U3_G(X, Y, Z, le_out_gg(X, Y)) → U4_G(X, Y, Z, sorted_in_g(.(Y, Z)))
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
SLOWSORT_IN_AG(X, Y) → U1_AG(X, Y, perm_in_ag(X, Y))
SLOWSORT_IN_AG(X, Y) → PERM_IN_AG(X, Y)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → DELETE_IN_GAA(U, .(X, Y), Z)
DELETE_IN_GAA(X, .(Y, Z), W) → U7_GAA(X, Y, Z, W, delete_in_gaa(X, Z, W))
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_AG(X, Y, U, V, perm_in_ag(Z, V))
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
U1_AG(X, Y, perm_out_ag(X, Y)) → U2_AG(X, Y, sorted_in_g(Y))
U1_AG(X, Y, perm_out_ag(X, Y)) → SORTED_IN_G(Y)
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
SORTED_IN_G(.(X, .(Y, Z))) → LE_IN_GG(X, Y)
LE_IN_GG(s(X), s(Y)) → U8_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U3_G(X, Y, Z, le_out_gg(X, Y)) → U4_G(X, Y, Z, sorted_in_g(.(Y, Z)))
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
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:
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
le_in_gg(x0, x1)
U8_gg(x0, x1, x2)
SORTED_IN_G(.(X, .(Y, Z))) → U3_G(X, Y, Z, le_in_gg(X, Y))
POL(.(x1, x2)) = 1 + 2·x1 + x2
POL(0) = 0
POL(SORTED_IN_G(x1)) = 2·x1
POL(U3_G(x1, x2, x3, x4)) = 2 + 2·x1 + 2·x2 + 2·x3 + x4
POL(U8_gg(x1, x2, x3)) = x1 + 2·x2 + x3
POL(le_in_gg(x1, x2)) = x1 + 2·x2
POL(le_out_gg(x1, x2)) = x1 + 2·x2
POL(s(x1)) = 2·x1
U3_G(X, Y, Z, le_out_gg(X, Y)) → SORTED_IN_G(.(Y, Z))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
le_in_gg(x0, x1)
U8_gg(x0, x1, x2)
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
DELETE_IN_GAA(X, .(Y, Z), W) → DELETE_IN_GAA(X, Z, W)
DELETE_IN_GAA(X) → DELETE_IN_GAA(X)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
slowsort_in_ag(X, Y) → U1_ag(X, Y, perm_in_ag(X, Y))
perm_in_ag([], []) → perm_out_ag([], [])
perm_in_ag(.(X, .(Y, [])), .(U, .(V, []))) → U5_ag(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_ag(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → U6_ag(X, Y, U, V, perm_in_ag(Z, V))
U6_ag(X, Y, U, V, perm_out_ag(Z, V)) → perm_out_ag(.(X, .(Y, [])), .(U, .(V, [])))
U1_ag(X, Y, perm_out_ag(X, Y)) → U2_ag(X, Y, sorted_in_g(Y))
sorted_in_g([]) → sorted_out_g([])
sorted_in_g(.(X, [])) → sorted_out_g(.(X, []))
sorted_in_g(.(X, .(Y, Z))) → U3_g(X, Y, Z, le_in_gg(X, Y))
le_in_gg(s(X), s(Y)) → U8_gg(X, Y, le_in_gg(X, Y))
le_in_gg(0, s(X)) → le_out_gg(0, s(X))
le_in_gg(0, 0) → le_out_gg(0, 0)
U8_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U3_g(X, Y, Z, le_out_gg(X, Y)) → U4_g(X, Y, Z, sorted_in_g(.(Y, Z)))
U4_g(X, Y, Z, sorted_out_g(.(Y, Z))) → sorted_out_g(.(X, .(Y, Z)))
U2_ag(X, Y, sorted_out_g(Y)) → slowsort_out_ag(X, Y)
U5_AG(X, Y, U, V, delete_out_gaa(U, .(X, Y), Z)) → PERM_IN_AG(Z, V)
PERM_IN_AG(.(X, .(Y, [])), .(U, .(V, []))) → U5_AG(X, Y, U, V, delete_in_gaa(U, .(X, Y), Z))
delete_in_gaa(X, .(X, Y), Y) → delete_out_gaa(X, .(X, Y), Y)
delete_in_gaa(X, .(Y, Z), W) → U7_gaa(X, Y, Z, W, delete_in_gaa(X, Z, W))
U7_gaa(X, Y, Z, W, delete_out_gaa(X, Z, W)) → delete_out_gaa(X, .(Y, Z), W)
U5_AG(U, V, delete_out_gaa(U)) → PERM_IN_AG(V)
PERM_IN_AG(.(U, .(V, []))) → U5_AG(U, V, delete_in_gaa(U))
delete_in_gaa(X) → delete_out_gaa(X)
delete_in_gaa(X) → U7_gaa(X, delete_in_gaa(X))
U7_gaa(X, delete_out_gaa(X)) → delete_out_gaa(X)
delete_in_gaa(x0)
U7_gaa(x0, x1)
From the DPs we obtained the following set of size-change graphs: