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 PrologToPiTRSProof (⇐)
↳27 PiTRS
↳28 DependencyPairsProof (⇔)
↳29 PiDP
↳30 DependencyGraphProof (⇔)
↳31 AND
↳32 PiDP
↳33 UsableRulesProof (⇔)
↳34 PiDP
↳35 PiDPToQDPProof (⇔)
↳36 QDP
↳37 QDPSizeChangeProof (⇔)
↳38 TRUE
↳39 PiDP
↳40 UsableRulesProof (⇔)
↳41 PiDP
↳42 PiDPToQDPProof (⇔)
↳43 QDP
↳44 QDPSizeChangeProof (⇔)
↳45 TRUE
↳46 PiDP
↳47 UsableRulesProof (⇔)
↳48 PiDP
↳49 PiDPToQDPProof (⇐)
↳50 QDP
↳51 MRRProof (⇔)
↳52 QDP
↳53 DependencyGraphProof (⇔)
↳54 TRUE
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
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(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → LEQ_IN_GG(X, Y)
LEQ_IN_GG(s(X), s(Y)) → U6_GG(X, Y, leq_in_gg(X, Y))
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → LESS_IN_GG(Y, X)
LESS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → LEQ_IN_GG(X, Y)
LEQ_IN_GG(s(X), s(Y)) → U6_GG(X, Y, leq_in_gg(X, Y))
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → LESS_IN_GG(Y, X)
LESS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
LESS_IN_GG(s(X), s(Y)) → LESS_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(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
LEQ_IN_GG(s(X), s(Y)) → LEQ_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(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U1_GGA(X, Xs, Y, Ys, leq_out_gg) → MERGE_IN_GGA(Xs, .(Y, Ys))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys)) → U1_GGA(X, Xs, Y, Ys, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys)) → U3_GGA(X, Xs, Y, Ys, less_in_gg(Y, X))
U3_GGA(X, Xs, Y, Ys, less_out_gg) → MERGE_IN_GGA(.(X, Xs), Ys)
leq_in_gg(0, 0) → leq_out_gg
leq_in_gg(0, s(0)) → leq_out_gg
leq_in_gg(s(X), s(Y)) → U6_gg(leq_in_gg(X, Y))
less_in_gg(0, s(0)) → less_out_gg
less_in_gg(s(X), s(Y)) → U5_gg(less_in_gg(X, Y))
U6_gg(leq_out_gg) → leq_out_gg
U5_gg(less_out_gg) → less_out_gg
leq_in_gg(x0, x1)
less_in_gg(x0, x1)
U6_gg(x0)
U5_gg(x0)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
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(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → LEQ_IN_GG(X, Y)
LEQ_IN_GG(s(X), s(Y)) → U6_GG(X, Y, leq_in_gg(X, Y))
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → LESS_IN_GG(Y, X)
LESS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → LEQ_IN_GG(X, Y)
LEQ_IN_GG(s(X), s(Y)) → U6_GG(X, Y, leq_in_gg(X, Y))
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → LESS_IN_GG(Y, X)
LESS_IN_GG(s(X), s(Y)) → U5_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
LESS_IN_GG(s(X), s(Y)) → LESS_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(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
LEQ_IN_GG(s(X), s(Y)) → LEQ_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(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
LEQ_IN_GG(s(X), s(Y)) → LEQ_IN_GG(X, Y)
From the DPs we obtained the following set of size-change graphs:
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
merge_in_gga([], X, X) → merge_out_gga([], X, X)
merge_in_gga(X, [], X) → merge_out_gga(X, [], X)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_gga(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U1_gga(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → U2_gga(X, Xs, Y, Ys, Zs, merge_in_gga(Xs, .(Y, Ys), Zs))
merge_in_gga(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_gga(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U3_gga(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → U4_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U4_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(Y, Zs))
U2_gga(X, Xs, Y, Ys, Zs, merge_out_gga(Xs, .(Y, Ys), Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U1_GGA(X, Xs, Y, Ys, Zs, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys), Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U1_GGA(X, Xs, Y, Ys, Zs, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(Y, Zs)) → U3_GGA(X, Xs, Y, Ys, Zs, less_in_gg(Y, X))
U3_GGA(X, Xs, Y, Ys, Zs, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U1_GGA(X, Xs, Y, Ys, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys)) → U1_GGA(X, Xs, Y, Ys, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys)) → U3_GGA(X, Xs, Y, Ys, less_in_gg(Y, X))
U3_GGA(X, Xs, Y, Ys, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys)
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
leq_in_gg(x0, x1)
less_in_gg(x0, x1)
U6_gg(x0, x1, x2)
U5_gg(x0, x1, x2)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys)) → U1_GGA(X, Xs, Y, Ys, leq_in_gg(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys)) → U3_GGA(X, Xs, Y, Ys, less_in_gg(Y, X))
POL(.(x1, x2)) = 1 + 2·x1 + x2
POL(0) = 0
POL(MERGE_IN_GGA(x1, x2)) = 2·x1 + 2·x2
POL(U1_GGA(x1, x2, x3, x4, x5)) = 2 + x1 + 2·x2 + 2·x3 + 2·x4 + x5
POL(U3_GGA(x1, x2, x3, x4, x5)) = 2 + 2·x1 + 2·x2 + 2·x3 + 2·x4 + 2·x5
POL(U5_gg(x1, x2, x3)) = x1 + x2 + x3
POL(U6_gg(x1, x2, x3)) = 2·x1 + 2·x2 + x3
POL(leq_in_gg(x1, x2)) = 2·x1 + 2·x2
POL(leq_out_gg(x1, x2)) = 2·x1 + 2·x2
POL(less_in_gg(x1, x2)) = x1 + x2
POL(less_out_gg(x1, x2)) = x1 + x2
POL(s(x1)) = 2·x1
U1_GGA(X, Xs, Y, Ys, leq_out_gg(X, Y)) → MERGE_IN_GGA(Xs, .(Y, Ys))
U3_GGA(X, Xs, Y, Ys, less_out_gg(Y, X)) → MERGE_IN_GGA(.(X, Xs), Ys)
leq_in_gg(0, 0) → leq_out_gg(0, 0)
leq_in_gg(0, s(0)) → leq_out_gg(0, s(0))
leq_in_gg(s(X), s(Y)) → U6_gg(X, Y, leq_in_gg(X, Y))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U5_gg(X, Y, less_in_gg(X, Y))
U6_gg(X, Y, leq_out_gg(X, Y)) → leq_out_gg(s(X), s(Y))
U5_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
leq_in_gg(x0, x1)
less_in_gg(x0, x1)
U6_gg(x0, x1, x2)
U5_gg(x0, x1, x2)