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 MRRProof (⇔)
↳13 QDP
↳14 DependencyGraphProof (⇔)
↳15 TRUE
↳16 PiDP
↳17 UsableRulesProof (⇔)
↳18 PiDP
↳19 PiDPToQDPProof (⇐)
↳20 QDP
↳21 Instantiation (⇔)
↳22 QDP
↳23 Instantiation (⇔)
↳24 QDP
↳25 Instantiation (⇔)
↳26 QDP
↳27 NonTerminationProof (⇔)
↳28 FALSE
↳29 PrologToPiTRSProof (⇐)
↳30 PiTRS
↳31 DependencyPairsProof (⇔)
↳32 PiDP
↳33 DependencyGraphProof (⇔)
↳34 AND
↳35 PiDP
↳36 UsableRulesProof (⇔)
↳37 PiDP
↳38 PiDPToQDPProof (⇔)
↳39 QDP
↳40 MRRProof (⇔)
↳41 QDP
↳42 DependencyGraphProof (⇔)
↳43 TRUE
↳44 PiDP
↳45 UsableRulesProof (⇔)
↳46 PiDP
↳47 PiDPToQDPProof (⇐)
↳48 QDP
↳49 Instantiation (⇔)
↳50 QDP
↳51 Instantiation (⇔)
↳52 QDP
↳53 Instantiation (⇔)
↳54 QDP
↳55 NonTerminationProof (⇔)
↳56 FALSE
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_aggg(X, 0, s(0), Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGGG(X, 0, s(0), Y)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → U2_AGGG(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → U3_AGGG(X, Half, Acc, Y, small_in_a(X))
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_A(X)
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → U4_AGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → U2_GGGG(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_G(X)
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → U4_GGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(X, Half, Y, Y) → U5_GGGG(X, Half, Y, small_in_g(X))
LOG2_IN_GGGG(X, Half, Y, Y) → SMALL_IN_G(X)
U5_GGGG(X, Half, Y, small_out_g(X)) → U6_GGGG(X, Half, Y, small_in_g(Half))
U5_GGGG(X, Half, Y, small_out_g(X)) → SMALL_IN_G(Half)
LOG2_IN_AGGG(X, Half, Y, Y) → U5_AGGG(X, Half, Y, small_in_a(X))
LOG2_IN_AGGG(X, Half, Y, Y) → SMALL_IN_A(X)
U5_AGGG(X, Half, Y, small_out_a(X)) → U6_AGGG(X, Half, Y, small_in_g(Half))
U5_AGGG(X, Half, Y, small_out_a(X)) → SMALL_IN_G(Half)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_aggg(X, 0, s(0), Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGGG(X, 0, s(0), Y)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → U2_AGGG(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → U3_AGGG(X, Half, Acc, Y, small_in_a(X))
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_A(X)
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → U4_AGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → U2_GGGG(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_G(X)
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → U4_GGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(X, Half, Y, Y) → U5_GGGG(X, Half, Y, small_in_g(X))
LOG2_IN_GGGG(X, Half, Y, Y) → SMALL_IN_G(X)
U5_GGGG(X, Half, Y, small_out_g(X)) → U6_GGGG(X, Half, Y, small_in_g(Half))
U5_GGGG(X, Half, Y, small_out_g(X)) → SMALL_IN_G(Half)
LOG2_IN_AGGG(X, Half, Y, Y) → U5_AGGG(X, Half, Y, small_in_a(X))
LOG2_IN_AGGG(X, Half, Y, Y) → SMALL_IN_A(X)
U5_AGGG(X, Half, Y, small_out_a(X)) → U6_AGGG(X, Half, Y, small_in_g(Half))
U5_AGGG(X, Half, Y, small_out_a(X)) → SMALL_IN_G(Half)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(Half, Acc, Y, small_in_g(X))
U3_GGGG(Half, Acc, Y, small_out_g) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
small_in_g(0) → small_out_g
small_in_g(s(0)) → small_out_g
small_in_g(x0)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
small_in_g(s(0)) → small_out_g
POL(0) = 0
POL(LOG2_IN_GGGG(x1, x2, x3, x4)) = x1 + x2 + x3 + x4
POL(U3_GGGG(x1, x2, x3, x4)) = 2 + x1 + x2 + x3 + x4
POL(s(x1)) = 1 + x1
POL(small_in_g(x1)) = x1
POL(small_out_g) = 0
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(Half, Acc, Y, small_in_g(X))
U3_GGGG(Half, Acc, Y, small_out_g) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
small_in_g(0) → small_out_g
small_in_g(x0)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
LOG2_IN_AGGG(Half, Acc, Y) → LOG2_IN_AGGG(s(Half), Acc, Y)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(s(z0)), z1, z2) → LOG2_IN_AGGG(s(s(s(z0))), z1, z2)
LOG2_IN_AGGG(s(s(z0)), z1, z2) → LOG2_IN_AGGG(s(s(s(z0))), z1, z2)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_aggg(X, 0, s(0), Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGGG(X, 0, s(0), Y)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → U2_AGGG(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → U3_AGGG(X, Half, Acc, Y, small_in_a(X))
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_A(X)
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → U4_AGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → U2_GGGG(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_G(X)
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → U4_GGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(X, Half, Y, Y) → U5_GGGG(X, Half, Y, small_in_g(X))
LOG2_IN_GGGG(X, Half, Y, Y) → SMALL_IN_G(X)
U5_GGGG(X, Half, Y, small_out_g(X)) → U6_GGGG(X, Half, Y, small_in_g(Half))
U5_GGGG(X, Half, Y, small_out_g(X)) → SMALL_IN_G(Half)
LOG2_IN_AGGG(X, Half, Y, Y) → U5_AGGG(X, Half, Y, small_in_a(X))
LOG2_IN_AGGG(X, Half, Y, Y) → SMALL_IN_A(X)
U5_AGGG(X, Half, Y, small_out_a(X)) → U6_AGGG(X, Half, Y, small_in_g(Half))
U5_AGGG(X, Half, Y, small_out_a(X)) → SMALL_IN_G(Half)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_aggg(X, 0, s(0), Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGGG(X, 0, s(0), Y)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → U2_AGGG(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → U3_AGGG(X, Half, Acc, Y, small_in_a(X))
LOG2_IN_AGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_A(X)
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → U4_AGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_AGGG(X, Half, Acc, Y, small_out_a(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → U2_GGGG(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → SMALL_IN_G(X)
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → U4_GGGG(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(X, Half, Y, Y) → U5_GGGG(X, Half, Y, small_in_g(X))
LOG2_IN_GGGG(X, Half, Y, Y) → SMALL_IN_G(X)
U5_GGGG(X, Half, Y, small_out_g(X)) → U6_GGGG(X, Half, Y, small_in_g(Half))
U5_GGGG(X, Half, Y, small_out_g(X)) → SMALL_IN_G(Half)
LOG2_IN_AGGG(X, Half, Y, Y) → U5_AGGG(X, Half, Y, small_in_a(X))
LOG2_IN_AGGG(X, Half, Y, Y) → SMALL_IN_A(X)
U5_AGGG(X, Half, Y, small_out_a(X)) → U6_AGGG(X, Half, Y, small_in_g(Half))
U5_AGGG(X, Half, Y, small_out_a(X)) → SMALL_IN_G(Half)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
small_in_g(x0)
LOG2_IN_GGGG(X, s(s(Half)), Acc, Y) → U3_GGGG(X, Half, Acc, Y, small_in_g(X))
LOG2_IN_GGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_GGGG(X, s(Half), Acc, Y)
POL(0) = 0
POL(LOG2_IN_GGGG(x1, x2, x3, x4)) = 2·x1 + 2·x2 + x3 + x4
POL(U3_GGGG(x1, x2, x3, x4, x5)) = 1 + x1 + 2·x2 + x3 + x4 + x5
POL(s(x1)) = 1 + x1
POL(small_in_g(x1)) = 2 + x1
POL(small_out_g(x1)) = 2 + x1
U3_GGGG(X, Half, Acc, Y, small_out_g(X)) → LOG2_IN_GGGG(Half, s(0), s(Acc), Y)
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
small_in_g(x0)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_aggg(X, 0, s(0), Y))
log2_in_aggg(s(s(X)), Half, Acc, Y) → U2_aggg(X, Half, Acc, Y, log2_in_aggg(X, s(Half), Acc, Y))
log2_in_aggg(X, s(s(Half)), Acc, Y) → U3_aggg(X, Half, Acc, Y, small_in_a(X))
small_in_a(0) → small_out_a(0)
small_in_a(s(0)) → small_out_a(s(0))
U3_aggg(X, Half, Acc, Y, small_out_a(X)) → U4_aggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(s(s(X)), Half, Acc, Y) → U2_gggg(X, Half, Acc, Y, log2_in_gggg(X, s(Half), Acc, Y))
log2_in_gggg(X, s(s(Half)), Acc, Y) → U3_gggg(X, Half, Acc, Y, small_in_g(X))
small_in_g(0) → small_out_g(0)
small_in_g(s(0)) → small_out_g(s(0))
U3_gggg(X, Half, Acc, Y, small_out_g(X)) → U4_gggg(X, Half, Acc, Y, log2_in_gggg(Half, s(0), s(Acc), Y))
log2_in_gggg(X, Half, Y, Y) → U5_gggg(X, Half, Y, small_in_g(X))
U5_gggg(X, Half, Y, small_out_g(X)) → U6_gggg(X, Half, Y, small_in_g(Half))
U6_gggg(X, Half, Y, small_out_g(Half)) → log2_out_gggg(X, Half, Y, Y)
U4_gggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_gggg(X, s(s(Half)), Acc, Y)
U2_gggg(X, Half, Acc, Y, log2_out_gggg(X, s(Half), Acc, Y)) → log2_out_gggg(s(s(X)), Half, Acc, Y)
U4_aggg(X, Half, Acc, Y, log2_out_gggg(Half, s(0), s(Acc), Y)) → log2_out_aggg(X, s(s(Half)), Acc, Y)
log2_in_aggg(X, Half, Y, Y) → U5_aggg(X, Half, Y, small_in_a(X))
U5_aggg(X, Half, Y, small_out_a(X)) → U6_aggg(X, Half, Y, small_in_g(Half))
U6_aggg(X, Half, Y, small_out_g(Half)) → log2_out_aggg(X, Half, Y, Y)
U2_aggg(X, Half, Acc, Y, log2_out_aggg(X, s(Half), Acc, Y)) → log2_out_aggg(s(s(X)), Half, Acc, Y)
U1_ag(X, Y, log2_out_aggg(X, 0, s(0), Y)) → log2_out_ag(X, Y)
LOG2_IN_AGGG(s(s(X)), Half, Acc, Y) → LOG2_IN_AGGG(X, s(Half), Acc, Y)
LOG2_IN_AGGG(Half, Acc, Y) → LOG2_IN_AGGG(s(Half), Acc, Y)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(z0), z1, z2) → LOG2_IN_AGGG(s(s(z0)), z1, z2)
LOG2_IN_AGGG(s(s(z0)), z1, z2) → LOG2_IN_AGGG(s(s(s(z0))), z1, z2)
LOG2_IN_AGGG(s(s(z0)), z1, z2) → LOG2_IN_AGGG(s(s(s(z0))), z1, z2)