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 DependencyGraphProof (⇔)
↳29 QDP
↳30 UsableRulesProof (⇔)
↳31 QDP
↳32 QReductionProof (⇔)
↳33 QDP
↳34 PrologToPiTRSProof (⇐)
↳35 PiTRS
↳36 DependencyPairsProof (⇔)
↳37 PiDP
↳38 DependencyGraphProof (⇔)
↳39 AND
↳40 PiDP
↳41 UsableRulesProof (⇔)
↳42 PiDP
↳43 PiDPToQDPProof (⇔)
↳44 QDP
↳45 QDPSizeChangeProof (⇔)
↳46 TRUE
↳47 PiDP
↳48 UsableRulesProof (⇔)
↳49 PiDP
↳50 PiDPToQDPProof (⇔)
↳51 QDP
↳52 QDPSizeChangeProof (⇔)
↳53 TRUE
↳54 PiDP
↳55 UsableRulesProof (⇔)
↳56 PiDP
↳57 PiDPToQDPProof (⇐)
↳58 QDP
↳59 QDPOrderProof (⇔)
↳60 QDP
↳61 DependencyGraphProof (⇔)
↳62 QDP
↳63 UsableRulesProof (⇔)
↳64 QDP
↳65 QReductionProof (⇔)
↳66 QDP
↳67 QDPSizeChangeProof (⇔)
↳68 TRUE
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → LE_IN_GG(A, B)
LE_IN_GG(s(X), s(Y)) → U6_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → U2_GGA(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → GT_IN_GG(A, B)
GT_IN_GG(s(X), s(Y)) → U5_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_GGA(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → LE_IN_GG(A, B)
LE_IN_GG(s(X), s(Y)) → U6_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → U2_GGA(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → GT_IN_GG(A, B)
GT_IN_GG(s(X), s(Y)) → U5_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_GGA(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
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)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
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:
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U1_GGA(A, X, B, Y, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y)
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_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)
U6_gg(x0, x1, x2)
U5_gg(x0, x1, x2)
U3_GGA(A, X, B, Y, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y)
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
POL(.(x1, x2)) = 2·x1 + x2
POL(MERGE_IN_GGA(x1, x2)) = 2·x1 + 2·x2
POL(U1_GGA(x1, x2, x3, x4, x5)) = x1 + 2·x2 + 2·x3 + 2·x4 + 2·x5
POL(U3_GGA(x1, x2, x3, x4, x5)) = 2·x1 + 2·x2 + 2·x3 + 2·x4 + x5
POL(U5_gg(x1, x2, x3)) = 2·x1 + 2·x2 + x3
POL(U6_gg(x1, x2, x3)) = x1 + x2 + x3
POL(gt_in_gg(x1, x2)) = 2·x1 + 2·x2
POL(gt_out_gg(x1, x2)) = 1 + 2·x1 + x2
POL(le_in_gg(x1, x2)) = x1 + x2
POL(le_out_gg(x1, x2)) = x1 + x2
POL(s(x1)) = 2·x1
POL(zero) = 2
U1_GGA(A, X, B, Y, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_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)
U6_gg(x0, x1, x2)
U5_gg(x0, x1, x2)
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
U1_GGA(A, X, B, Y, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_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)
U6_gg(x0, x1, x2)
U5_gg(x0, x1, x2)
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
U1_GGA(A, X, B, Y, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U6_gg(x0, x1, x2)
U5_gg(x0, x1, x2)
gt_in_gg(x0, x1)
U5_gg(x0, x1, x2)
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
U1_GGA(A, X, B, Y, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
le_in_gg(x0, x1)
U6_gg(x0, x1, x2)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → LE_IN_GG(A, B)
LE_IN_GG(s(X), s(Y)) → U6_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → U2_GGA(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → GT_IN_GG(A, B)
GT_IN_GG(s(X), s(Y)) → U5_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_GGA(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → LE_IN_GG(A, B)
LE_IN_GG(s(X), s(Y)) → U6_GG(X, Y, le_in_gg(X, Y))
LE_IN_GG(s(X), s(Y)) → LE_IN_GG(X, Y)
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → U2_GGA(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → GT_IN_GG(A, B)
GT_IN_GG(s(X), s(Y)) → U5_GG(X, Y, gt_in_gg(X, Y))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_GGA(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
GT_IN_GG(s(X), s(Y)) → GT_IN_GG(X, Y)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
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)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
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:
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(.(A, X), .(B, Y), .(A, Z)) → U1_gga(A, X, B, Y, Z, le_in_gg(A, B))
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U1_gga(A, X, B, Y, Z, le_out_gg(A, B)) → U2_gga(A, X, B, Y, Z, merge_in_gga(X, .(B, Y), Z))
merge_in_gga(.(A, X), .(B, Y), .(B, Z)) → U3_gga(A, X, B, Y, Z, gt_in_gg(A, B))
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U3_gga(A, X, B, Y, Z, gt_out_gg(A, B)) → U4_gga(A, X, B, Y, Z, merge_in_gga(.(A, X), Y, Z))
U4_gga(A, X, B, Y, Z, merge_out_gga(.(A, X), Y, Z)) → merge_out_gga(.(A, X), .(B, Y), .(B, Z))
U2_gga(A, X, B, Y, Z, merge_out_gga(X, .(B, Y), Z)) → merge_out_gga(.(A, X), .(B, Y), .(A, Z))
U1_GGA(A, X, B, Y, Z, le_out_gg(A, B)) → MERGE_IN_GGA(X, .(B, Y), Z)
MERGE_IN_GGA(.(A, X), .(B, Y), .(A, Z)) → U1_GGA(A, X, B, Y, Z, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y), .(B, Z)) → U3_GGA(A, X, B, Y, Z, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, Z, gt_out_gg(A, B)) → MERGE_IN_GGA(.(A, X), Y, Z)
le_in_gg(s(X), s(Y)) → U6_gg(X, Y, le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg(zero, s(Y))
le_in_gg(zero, zero) → le_out_gg(zero, zero)
gt_in_gg(s(X), s(Y)) → U5_gg(X, Y, gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg(s(X), zero)
U6_gg(X, Y, le_out_gg(X, Y)) → le_out_gg(s(X), s(Y))
U5_gg(X, Y, gt_out_gg(X, Y)) → gt_out_gg(s(X), s(Y))
U1_GGA(A, X, B, Y, le_out_gg) → MERGE_IN_GGA(X, .(B, Y))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, gt_out_gg) → MERGE_IN_GGA(.(A, X), Y)
le_in_gg(s(X), s(Y)) → U6_gg(le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg
le_in_gg(zero, zero) → le_out_gg
gt_in_gg(s(X), s(Y)) → U5_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg
U6_gg(le_out_gg) → le_out_gg
U5_gg(gt_out_gg) → gt_out_gg
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U6_gg(x0)
U5_gg(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
U1_GGA(A, X, B, Y, le_out_gg) → MERGE_IN_GGA(X, .(B, Y))
POL(.(x1, x2)) = x1 + x2
POL(MERGE_IN_GGA(x1, x2)) = x1
POL(U1_GGA(x1, x2, x3, x4, x5)) = x2 + x5
POL(U3_GGA(x1, x2, x3, x4, x5)) = x1 + x2
POL(U5_gg(x1)) = 0
POL(U6_gg(x1)) = 1
POL(gt_in_gg(x1, x2)) = 0
POL(gt_out_gg) = 0
POL(le_in_gg(x1, x2)) = x1
POL(le_out_gg) = 1
POL(s(x1)) = 1
POL(zero) = 1
le_in_gg(s(X), s(Y)) → U6_gg(le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg
le_in_gg(zero, zero) → le_out_gg
U6_gg(le_out_gg) → le_out_gg
MERGE_IN_GGA(.(A, X), .(B, Y)) → U1_GGA(A, X, B, Y, le_in_gg(A, B))
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, gt_out_gg) → MERGE_IN_GGA(.(A, X), Y)
le_in_gg(s(X), s(Y)) → U6_gg(le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg
le_in_gg(zero, zero) → le_out_gg
gt_in_gg(s(X), s(Y)) → U5_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg
U6_gg(le_out_gg) → le_out_gg
U5_gg(gt_out_gg) → gt_out_gg
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U6_gg(x0)
U5_gg(x0)
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, gt_out_gg) → MERGE_IN_GGA(.(A, X), Y)
le_in_gg(s(X), s(Y)) → U6_gg(le_in_gg(X, Y))
le_in_gg(zero, s(Y)) → le_out_gg
le_in_gg(zero, zero) → le_out_gg
gt_in_gg(s(X), s(Y)) → U5_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg
U6_gg(le_out_gg) → le_out_gg
U5_gg(gt_out_gg) → gt_out_gg
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U6_gg(x0)
U5_gg(x0)
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, gt_out_gg) → MERGE_IN_GGA(.(A, X), Y)
gt_in_gg(s(X), s(Y)) → U5_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg
U5_gg(gt_out_gg) → gt_out_gg
le_in_gg(x0, x1)
gt_in_gg(x0, x1)
U6_gg(x0)
U5_gg(x0)
le_in_gg(x0, x1)
U6_gg(x0)
MERGE_IN_GGA(.(A, X), .(B, Y)) → U3_GGA(A, X, B, Y, gt_in_gg(A, B))
U3_GGA(A, X, B, Y, gt_out_gg) → MERGE_IN_GGA(.(A, X), Y)
gt_in_gg(s(X), s(Y)) → U5_gg(gt_in_gg(X, Y))
gt_in_gg(s(X), zero) → gt_out_gg
U5_gg(gt_out_gg) → gt_out_gg
gt_in_gg(x0, x1)
U5_gg(x0)
From the DPs we obtained the following set of size-change graphs: