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 PiDPToQDPProof (⇐)
↳30 QDP
↳31 Narrowing (⇐)
↳32 QDP
↳33 Narrowing (⇐)
↳34 QDP
↳35 Narrowing (⇐)
↳36 QDP
↳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 QDPSizeChangeProof (⇔)
↳56 TRUE
↳57 PiDP
↳58 UsableRulesProof (⇔)
↳59 PiDP
↳60 PiDPToQDPProof (⇔)
↳61 QDP
↳62 QDPSizeChangeProof (⇔)
↳63 TRUE
↳64 PiDP
↳65 PiDPToQDPProof (⇐)
↳66 QDP
↳67 Narrowing (⇐)
↳68 QDP
↳69 Narrowing (⇐)
↳70 QDP
↳71 Narrowing (⇐)
↳72 QDP
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
F_IN_GA(X, N) → U5_GA(X, N, less_in_gg(s(s(0)), X))
F_IN_GA(X, N) → LESS_IN_GG(s(s(0)), X)
LESS_IN_GG(s(X), s(Y)) → U1_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(X, s(Y)) → U2_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
U5_GA(X, N, less_out_gg(s(s(0)), X)) → U6_GA(X, N, add_in_agg(N, s(0), X))
U5_GA(X, N, less_out_gg(s(s(0)), X)) → ADD_IN_AGG(N, s(0), X)
ADD_IN_AGG(s(X), Y, s(N)) → U3_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(X, s(Y), s(N)) → U4_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
F_IN_GA(X, N) → U7_GA(X, N, less_in_gg(X, s(s(s(0)))))
F_IN_GA(X, N) → LESS_IN_GG(X, s(s(s(0))))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → U8_GA(X, N, add_in_gga(X, s(s(0)), S))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → ADD_IN_GGA(X, s(s(0)), S)
ADD_IN_GGA(s(X), Y, s(N)) → U3_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(X, s(Y), s(N)) → U4_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → U9_GA(X, N, f_in_ga(S, N1))
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S, N1)
U9_GA(X, N, f_out_ga(S, N1)) → U10_GA(X, N, f_in_ga(N1, N))
U9_GA(X, N, f_out_ga(S, N1)) → F_IN_GA(N1, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
F_IN_GA(X, N) → U5_GA(X, N, less_in_gg(s(s(0)), X))
F_IN_GA(X, N) → LESS_IN_GG(s(s(0)), X)
LESS_IN_GG(s(X), s(Y)) → U1_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(X, s(Y)) → U2_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
U5_GA(X, N, less_out_gg(s(s(0)), X)) → U6_GA(X, N, add_in_agg(N, s(0), X))
U5_GA(X, N, less_out_gg(s(s(0)), X)) → ADD_IN_AGG(N, s(0), X)
ADD_IN_AGG(s(X), Y, s(N)) → U3_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(X, s(Y), s(N)) → U4_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
F_IN_GA(X, N) → U7_GA(X, N, less_in_gg(X, s(s(s(0)))))
F_IN_GA(X, N) → LESS_IN_GG(X, s(s(s(0))))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → U8_GA(X, N, add_in_gga(X, s(s(0)), S))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → ADD_IN_GGA(X, s(s(0)), S)
ADD_IN_GGA(s(X), Y, s(N)) → U3_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(X, s(Y), s(N)) → U4_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → U9_GA(X, N, f_in_ga(S, N1))
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S, N1)
U9_GA(X, N, f_out_ga(S, N1)) → U10_GA(X, N, f_in_ga(N1, N))
U9_GA(X, N, f_out_ga(S, N1)) → F_IN_GA(N1, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(X, s(Y)) → ADD_IN_GGA(X, Y)
ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)
From the DPs we obtained the following set of size-change graphs:
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(s(Y), s(N)) → ADD_IN_AGG(Y, N)
ADD_IN_AGG(Y, s(N)) → ADD_IN_AGG(Y, N)
From the DPs we obtained the following set of size-change graphs:
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(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:
F_IN_GA(X, N) → U7_GA(X, N, less_in_gg(X, s(s(s(0)))))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → U8_GA(X, N, add_in_gga(X, s(s(0)), S))
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → U9_GA(X, N, f_in_ga(S, N1))
U9_GA(X, N, f_out_ga(S, N1)) → F_IN_GA(N1, N)
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S, N1)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
F_IN_GA(X) → U7_GA(X, less_in_gg(X, s(s(s(0)))))
U7_GA(X, less_out_gg(X, s(s(s(0))))) → U8_GA(X, add_in_gga(X, s(s(0))))
U8_GA(X, add_out_gga(X, s(s(0)), S)) → U9_GA(X, f_in_ga(S))
U9_GA(X, f_out_ga(S, N1)) → F_IN_GA(N1)
U8_GA(X, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S)
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, less_out_gg(s(s(0)), X)) → U6_ga(X, add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0, 0, 0)
add_in_agg(Y, s(N)) → U3_agg(Y, N, add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(Y, N, add_in_agg(Y, N))
U4_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg(X, s(s(s(0))))) → U8_ga(X, add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y) → U3_gga(X, Y, add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(X, Y, add_in_gga(X, Y))
U4_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, add_out_gga(X, s(s(0)), S)) → U9_ga(X, f_in_ga(S))
U9_ga(X, f_out_ga(S, N1)) → U10_ga(X, f_in_ga(N1))
U10_ga(X, f_out_ga(N1, N)) → f_out_ga(X, N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0, x1, x2)
U1_gg(x0, x1, x2)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0, x1, x2)
U3_agg(x0, x1, x2)
U6_ga(x0, x1)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0, x1, x2)
U3_gga(x0, x1, x2)
U8_ga(x0, x1)
U9_ga(x0, x1)
U10_ga(x0, x1)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
U7_GA(X, less_out_gg(X, s(s(s(0))))) → U8_GA(X, add_in_gga(X, s(s(0))))
U8_GA(X, add_out_gga(X, s(s(0)), S)) → U9_GA(X, f_in_ga(S))
U9_GA(X, f_out_ga(S, N1)) → F_IN_GA(N1)
U8_GA(X, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, less_out_gg(s(s(0)), X)) → U6_ga(X, add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0, 0, 0)
add_in_agg(Y, s(N)) → U3_agg(Y, N, add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(Y, N, add_in_agg(Y, N))
U4_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg(X, s(s(s(0))))) → U8_ga(X, add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y) → U3_gga(X, Y, add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(X, Y, add_in_gga(X, Y))
U4_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, add_out_gga(X, s(s(0)), S)) → U9_ga(X, f_in_ga(S))
U9_ga(X, f_out_ga(S, N1)) → U10_ga(X, f_in_ga(N1))
U10_ga(X, f_out_ga(N1, N)) → f_out_ga(X, N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0, x1, x2)
U1_gg(x0, x1, x2)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0, x1, x2)
U3_agg(x0, x1, x2)
U6_ga(x0, x1)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0, x1, x2)
U3_gga(x0, x1, x2)
U8_ga(x0, x1)
U9_ga(x0, x1)
U10_ga(x0, x1)
U7_GA(s(x0), less_out_gg(s(x0), s(s(s(0))))) → U8_GA(s(x0), U3_gga(x0, s(s(0)), add_in_gga(x0, s(s(0)))))
U7_GA(x0, less_out_gg(x0, s(s(s(0))))) → U8_GA(x0, U4_gga(x0, s(0), add_in_gga(x0, s(0))))
U8_GA(X, add_out_gga(X, s(s(0)), S)) → U9_GA(X, f_in_ga(S))
U9_GA(X, f_out_ga(S, N1)) → F_IN_GA(N1)
U8_GA(X, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
U7_GA(s(x0), less_out_gg(s(x0), s(s(s(0))))) → U8_GA(s(x0), U3_gga(x0, s(s(0)), add_in_gga(x0, s(s(0)))))
U7_GA(x0, less_out_gg(x0, s(s(s(0))))) → U8_GA(x0, U4_gga(x0, s(0), add_in_gga(x0, s(0))))
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, less_out_gg(s(s(0)), X)) → U6_ga(X, add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0, 0, 0)
add_in_agg(Y, s(N)) → U3_agg(Y, N, add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(Y, N, add_in_agg(Y, N))
U4_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg(X, s(s(s(0))))) → U8_ga(X, add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y) → U3_gga(X, Y, add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(X, Y, add_in_gga(X, Y))
U4_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, add_out_gga(X, s(s(0)), S)) → U9_ga(X, f_in_ga(S))
U9_ga(X, f_out_ga(S, N1)) → U10_ga(X, f_in_ga(N1))
U10_ga(X, f_out_ga(N1, N)) → f_out_ga(X, N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0, x1, x2)
U1_gg(x0, x1, x2)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0, x1, x2)
U3_agg(x0, x1, x2)
U6_ga(x0, x1)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0, x1, x2)
U3_gga(x0, x1, x2)
U8_ga(x0, x1)
U9_ga(x0, x1)
U10_ga(x0, x1)
U8_GA(y0, add_out_gga(y0, s(s(0)), x0)) → U9_GA(y0, U5_ga(x0, less_in_gg(s(s(0)), x0)))
U8_GA(y0, add_out_gga(y0, s(s(0)), x0)) → U9_GA(y0, U7_ga(x0, less_in_gg(x0, s(s(s(0))))))
U9_GA(X, f_out_ga(S, N1)) → F_IN_GA(N1)
U8_GA(X, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(x0, s(s(0)), less_in_gg(x0, s(s(0)))))
U7_GA(s(x0), less_out_gg(s(x0), s(s(s(0))))) → U8_GA(s(x0), U3_gga(x0, s(s(0)), add_in_gga(x0, s(s(0)))))
U7_GA(x0, less_out_gg(x0, s(s(s(0))))) → U8_GA(x0, U4_gga(x0, s(0), add_in_gga(x0, s(0))))
U8_GA(y0, add_out_gga(y0, s(s(0)), x0)) → U9_GA(y0, U5_ga(x0, less_in_gg(s(s(0)), x0)))
U8_GA(y0, add_out_gga(y0, s(s(0)), x0)) → U9_GA(y0, U7_ga(x0, less_in_gg(x0, s(s(s(0))))))
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, less_out_gg(s(s(0)), X)) → U6_ga(X, add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0, 0, 0)
add_in_agg(Y, s(N)) → U3_agg(Y, N, add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(Y, N, add_in_agg(Y, N))
U4_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg(X, s(s(s(0))))) → U8_ga(X, add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y) → U3_gga(X, Y, add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(X, Y, add_in_gga(X, Y))
U4_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, add_out_gga(X, s(s(0)), S)) → U9_ga(X, f_in_ga(S))
U9_ga(X, f_out_ga(S, N1)) → U10_ga(X, f_in_ga(N1))
U10_ga(X, f_out_ga(N1, N)) → f_out_ga(X, N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0, x1, x2)
U1_gg(x0, x1, x2)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0, x1, x2)
U3_agg(x0, x1, x2)
U6_ga(x0, x1)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0, x1, x2)
U3_gga(x0, x1, x2)
U8_ga(x0, x1)
U9_ga(x0, x1)
U10_ga(x0, x1)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
F_IN_GA(X, N) → U5_GA(X, N, less_in_gg(s(s(0)), X))
F_IN_GA(X, N) → LESS_IN_GG(s(s(0)), X)
LESS_IN_GG(s(X), s(Y)) → U1_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(X, s(Y)) → U2_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
U5_GA(X, N, less_out_gg(s(s(0)), X)) → U6_GA(X, N, add_in_agg(N, s(0), X))
U5_GA(X, N, less_out_gg(s(s(0)), X)) → ADD_IN_AGG(N, s(0), X)
ADD_IN_AGG(s(X), Y, s(N)) → U3_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(X, s(Y), s(N)) → U4_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
F_IN_GA(X, N) → U7_GA(X, N, less_in_gg(X, s(s(s(0)))))
F_IN_GA(X, N) → LESS_IN_GG(X, s(s(s(0))))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → U8_GA(X, N, add_in_gga(X, s(s(0)), S))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → ADD_IN_GGA(X, s(s(0)), S)
ADD_IN_GGA(s(X), Y, s(N)) → U3_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(X, s(Y), s(N)) → U4_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → U9_GA(X, N, f_in_ga(S, N1))
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S, N1)
U9_GA(X, N, f_out_ga(S, N1)) → U10_GA(X, N, f_in_ga(N1, N))
U9_GA(X, N, f_out_ga(S, N1)) → F_IN_GA(N1, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
F_IN_GA(X, N) → U5_GA(X, N, less_in_gg(s(s(0)), X))
F_IN_GA(X, N) → LESS_IN_GG(s(s(0)), X)
LESS_IN_GG(s(X), s(Y)) → U1_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(X, s(Y)) → U2_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
U5_GA(X, N, less_out_gg(s(s(0)), X)) → U6_GA(X, N, add_in_agg(N, s(0), X))
U5_GA(X, N, less_out_gg(s(s(0)), X)) → ADD_IN_AGG(N, s(0), X)
ADD_IN_AGG(s(X), Y, s(N)) → U3_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(X, s(Y), s(N)) → U4_AGG(X, Y, N, add_in_agg(X, Y, N))
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
F_IN_GA(X, N) → U7_GA(X, N, less_in_gg(X, s(s(s(0)))))
F_IN_GA(X, N) → LESS_IN_GG(X, s(s(s(0))))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → U8_GA(X, N, add_in_gga(X, s(s(0)), S))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → ADD_IN_GGA(X, s(s(0)), S)
ADD_IN_GGA(s(X), Y, s(N)) → U3_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(X, s(Y), s(N)) → U4_GGA(X, Y, N, add_in_gga(X, Y, N))
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → U9_GA(X, N, f_in_ga(S, N1))
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S, N1)
U9_GA(X, N, f_out_ga(S, N1)) → U10_GA(X, N, f_in_ga(N1, N))
U9_GA(X, N, f_out_ga(S, N1)) → F_IN_GA(N1, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
ADD_IN_GGA(X, s(Y), s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(s(X), Y, s(N)) → ADD_IN_GGA(X, Y, N)
ADD_IN_GGA(X, s(Y)) → ADD_IN_GGA(X, Y)
ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)
From the DPs we obtained the following set of size-change graphs:
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
ADD_IN_AGG(X, s(Y), s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(s(X), Y, s(N)) → ADD_IN_AGG(X, Y, N)
ADD_IN_AGG(s(Y), s(N)) → ADD_IN_AGG(Y, N)
ADD_IN_AGG(Y, s(N)) → ADD_IN_AGG(Y, N)
From the DPs we obtained the following set of size-change graphs:
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
LESS_IN_GG(X, s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
LESS_IN_GG(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:
F_IN_GA(X, N) → U7_GA(X, N, less_in_gg(X, s(s(s(0)))))
U7_GA(X, N, less_out_gg(X, s(s(s(0))))) → U8_GA(X, N, add_in_gga(X, s(s(0)), S))
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → U9_GA(X, N, f_in_ga(S, N1))
U9_GA(X, N, f_out_ga(S, N1)) → F_IN_GA(N1, N)
U8_GA(X, N, add_out_gga(X, s(s(0)), S)) → F_IN_GA(S, N1)
f_in_ga(X, N) → U5_ga(X, N, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg(0, s(0))
less_in_gg(s(X), s(Y)) → U1_gg(X, Y, less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(X, Y, less_in_gg(X, Y))
U2_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(X, s(Y))
U1_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ga(X, N, less_out_gg(s(s(0)), X)) → U6_ga(X, N, add_in_agg(N, s(0), X))
add_in_agg(0, 0, 0) → add_out_agg(0, 0, 0)
add_in_agg(s(X), Y, s(N)) → U3_agg(X, Y, N, add_in_agg(X, Y, N))
add_in_agg(X, s(Y), s(N)) → U4_agg(X, Y, N, add_in_agg(X, Y, N))
U4_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(X, s(Y), s(N))
U3_agg(X, Y, N, add_out_agg(X, Y, N)) → add_out_agg(s(X), Y, s(N))
U6_ga(X, N, add_out_agg(N, s(0), X)) → f_out_ga(X, N)
f_in_ga(X, N) → U7_ga(X, N, less_in_gg(X, s(s(s(0)))))
U7_ga(X, N, less_out_gg(X, s(s(s(0))))) → U8_ga(X, N, add_in_gga(X, s(s(0)), S))
add_in_gga(0, 0, 0) → add_out_gga(0, 0, 0)
add_in_gga(s(X), Y, s(N)) → U3_gga(X, Y, N, add_in_gga(X, Y, N))
add_in_gga(X, s(Y), s(N)) → U4_gga(X, Y, N, add_in_gga(X, Y, N))
U4_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(X, s(Y), s(N))
U3_gga(X, Y, N, add_out_gga(X, Y, N)) → add_out_gga(s(X), Y, s(N))
U8_ga(X, N, add_out_gga(X, s(s(0)), S)) → U9_ga(X, N, f_in_ga(S, N1))
U9_ga(X, N, f_out_ga(S, N1)) → U10_ga(X, N, f_in_ga(N1, N))
U10_ga(X, N, f_out_ga(N1, N)) → f_out_ga(X, N)
F_IN_GA(X) → U7_GA(X, less_in_gg(X, s(s(s(0)))))
U7_GA(X, less_out_gg) → U8_GA(add_in_gga(X, s(s(0))))
U8_GA(add_out_gga(S)) → U9_GA(f_in_ga(S))
U9_GA(f_out_ga(N1)) → F_IN_GA(N1)
U8_GA(add_out_gga(S)) → F_IN_GA(S)
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg
less_in_gg(s(X), s(Y)) → U1_gg(less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(less_in_gg(X, Y))
U2_gg(less_out_gg) → less_out_gg
U1_gg(less_out_gg) → less_out_gg
U5_ga(X, less_out_gg) → U6_ga(add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0)
add_in_agg(Y, s(N)) → U3_agg(add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(add_in_agg(Y, N))
U4_agg(add_out_agg(X)) → add_out_agg(X)
U3_agg(add_out_agg(X)) → add_out_agg(s(X))
U6_ga(add_out_agg(N)) → f_out_ga(N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg) → U8_ga(add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0)
add_in_gga(s(X), Y) → U3_gga(add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(add_in_gga(X, Y))
U4_gga(add_out_gga(N)) → add_out_gga(s(N))
U3_gga(add_out_gga(N)) → add_out_gga(s(N))
U8_ga(add_out_gga(S)) → U9_ga(f_in_ga(S))
U9_ga(f_out_ga(N1)) → U10_ga(f_in_ga(N1))
U10_ga(f_out_ga(N)) → f_out_ga(N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0)
U1_gg(x0)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0)
U3_agg(x0)
U6_ga(x0)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0)
U3_gga(x0)
U8_ga(x0)
U9_ga(x0)
U10_ga(x0)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(less_in_gg(x0, s(s(0)))))
U7_GA(X, less_out_gg) → U8_GA(add_in_gga(X, s(s(0))))
U8_GA(add_out_gga(S)) → U9_GA(f_in_ga(S))
U9_GA(f_out_ga(N1)) → F_IN_GA(N1)
U8_GA(add_out_gga(S)) → F_IN_GA(S)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(less_in_gg(x0, s(s(0)))))
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg
less_in_gg(s(X), s(Y)) → U1_gg(less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(less_in_gg(X, Y))
U2_gg(less_out_gg) → less_out_gg
U1_gg(less_out_gg) → less_out_gg
U5_ga(X, less_out_gg) → U6_ga(add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0)
add_in_agg(Y, s(N)) → U3_agg(add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(add_in_agg(Y, N))
U4_agg(add_out_agg(X)) → add_out_agg(X)
U3_agg(add_out_agg(X)) → add_out_agg(s(X))
U6_ga(add_out_agg(N)) → f_out_ga(N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg) → U8_ga(add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0)
add_in_gga(s(X), Y) → U3_gga(add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(add_in_gga(X, Y))
U4_gga(add_out_gga(N)) → add_out_gga(s(N))
U3_gga(add_out_gga(N)) → add_out_gga(s(N))
U8_ga(add_out_gga(S)) → U9_ga(f_in_ga(S))
U9_ga(f_out_ga(N1)) → U10_ga(f_in_ga(N1))
U10_ga(f_out_ga(N)) → f_out_ga(N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0)
U1_gg(x0)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0)
U3_agg(x0)
U6_ga(x0)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0)
U3_gga(x0)
U8_ga(x0)
U9_ga(x0)
U10_ga(x0)
U7_GA(s(x0), less_out_gg) → U8_GA(U3_gga(add_in_gga(x0, s(s(0)))))
U7_GA(x0, less_out_gg) → U8_GA(U4_gga(add_in_gga(x0, s(0))))
U8_GA(add_out_gga(S)) → U9_GA(f_in_ga(S))
U9_GA(f_out_ga(N1)) → F_IN_GA(N1)
U8_GA(add_out_gga(S)) → F_IN_GA(S)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(less_in_gg(x0, s(s(0)))))
U7_GA(s(x0), less_out_gg) → U8_GA(U3_gga(add_in_gga(x0, s(s(0)))))
U7_GA(x0, less_out_gg) → U8_GA(U4_gga(add_in_gga(x0, s(0))))
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg
less_in_gg(s(X), s(Y)) → U1_gg(less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(less_in_gg(X, Y))
U2_gg(less_out_gg) → less_out_gg
U1_gg(less_out_gg) → less_out_gg
U5_ga(X, less_out_gg) → U6_ga(add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0)
add_in_agg(Y, s(N)) → U3_agg(add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(add_in_agg(Y, N))
U4_agg(add_out_agg(X)) → add_out_agg(X)
U3_agg(add_out_agg(X)) → add_out_agg(s(X))
U6_ga(add_out_agg(N)) → f_out_ga(N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg) → U8_ga(add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0)
add_in_gga(s(X), Y) → U3_gga(add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(add_in_gga(X, Y))
U4_gga(add_out_gga(N)) → add_out_gga(s(N))
U3_gga(add_out_gga(N)) → add_out_gga(s(N))
U8_ga(add_out_gga(S)) → U9_ga(f_in_ga(S))
U9_ga(f_out_ga(N1)) → U10_ga(f_in_ga(N1))
U10_ga(f_out_ga(N)) → f_out_ga(N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0)
U1_gg(x0)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0)
U3_agg(x0)
U6_ga(x0)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0)
U3_gga(x0)
U8_ga(x0)
U9_ga(x0)
U10_ga(x0)
U8_GA(add_out_gga(x0)) → U9_GA(U5_ga(x0, less_in_gg(s(s(0)), x0)))
U8_GA(add_out_gga(x0)) → U9_GA(U7_ga(x0, less_in_gg(x0, s(s(s(0))))))
U9_GA(f_out_ga(N1)) → F_IN_GA(N1)
U8_GA(add_out_gga(S)) → F_IN_GA(S)
F_IN_GA(s(x0)) → U7_GA(s(x0), U1_gg(less_in_gg(x0, s(s(0)))))
F_IN_GA(x0) → U7_GA(x0, U2_gg(less_in_gg(x0, s(s(0)))))
U7_GA(s(x0), less_out_gg) → U8_GA(U3_gga(add_in_gga(x0, s(s(0)))))
U7_GA(x0, less_out_gg) → U8_GA(U4_gga(add_in_gga(x0, s(0))))
U8_GA(add_out_gga(x0)) → U9_GA(U5_ga(x0, less_in_gg(s(s(0)), x0)))
U8_GA(add_out_gga(x0)) → U9_GA(U7_ga(x0, less_in_gg(x0, s(s(s(0))))))
f_in_ga(X) → U5_ga(X, less_in_gg(s(s(0)), X))
less_in_gg(0, s(0)) → less_out_gg
less_in_gg(s(X), s(Y)) → U1_gg(less_in_gg(X, Y))
less_in_gg(X, s(Y)) → U2_gg(less_in_gg(X, Y))
U2_gg(less_out_gg) → less_out_gg
U1_gg(less_out_gg) → less_out_gg
U5_ga(X, less_out_gg) → U6_ga(add_in_agg(s(0), X))
add_in_agg(0, 0) → add_out_agg(0)
add_in_agg(Y, s(N)) → U3_agg(add_in_agg(Y, N))
add_in_agg(s(Y), s(N)) → U4_agg(add_in_agg(Y, N))
U4_agg(add_out_agg(X)) → add_out_agg(X)
U3_agg(add_out_agg(X)) → add_out_agg(s(X))
U6_ga(add_out_agg(N)) → f_out_ga(N)
f_in_ga(X) → U7_ga(X, less_in_gg(X, s(s(s(0)))))
U7_ga(X, less_out_gg) → U8_ga(add_in_gga(X, s(s(0))))
add_in_gga(0, 0) → add_out_gga(0)
add_in_gga(s(X), Y) → U3_gga(add_in_gga(X, Y))
add_in_gga(X, s(Y)) → U4_gga(add_in_gga(X, Y))
U4_gga(add_out_gga(N)) → add_out_gga(s(N))
U3_gga(add_out_gga(N)) → add_out_gga(s(N))
U8_ga(add_out_gga(S)) → U9_ga(f_in_ga(S))
U9_ga(f_out_ga(N1)) → U10_ga(f_in_ga(N1))
U10_ga(f_out_ga(N)) → f_out_ga(N)
f_in_ga(x0)
less_in_gg(x0, x1)
U2_gg(x0)
U1_gg(x0)
U5_ga(x0, x1)
add_in_agg(x0, x1)
U4_agg(x0)
U3_agg(x0)
U6_ga(x0)
U7_ga(x0, x1)
add_in_gga(x0, x1)
U4_gga(x0)
U3_gga(x0)
U8_ga(x0)
U9_ga(x0)
U10_ga(x0)