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 UsableRulesReductionPairsProof (⇔)
↳13 QDP
↳14 MRRProof (⇔)
↳15 QDP
↳16 PisEmptyProof (⇔)
↳17 TRUE
↳18 PiDP
↳19 UsableRulesProof (⇔)
↳20 PiDP
↳21 PiDPToQDPProof (⇐)
↳22 QDP
↳23 UsableRulesReductionPairsProof (⇔)
↳24 QDP
↳25 DependencyGraphProof (⇔)
↳26 TRUE
↳27 PrologToPiTRSProof (⇐)
↳28 PiTRS
↳29 DependencyPairsProof (⇔)
↳30 PiDP
↳31 DependencyGraphProof (⇔)
↳32 AND
↳33 PiDP
↳34 UsableRulesProof (⇔)
↳35 PiDP
↳36 PiDPToQDPProof (⇐)
↳37 QDP
↳38 UsableRulesReductionPairsProof (⇔)
↳39 QDP
↳40 MRRProof (⇔)
↳41 QDP
↳42 PisEmptyProof (⇔)
↳43 TRUE
↳44 PiDP
↳45 UsableRulesProof (⇔)
↳46 PiDP
↳47 PiDPToQDPProof (⇐)
↳48 QDP
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
WEIGHT_IN_GA(.(N, .(M, XS)), X) → SUM_IN_GGA(.(N, .(M, XS)), .(0, XS), YS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → U1_GGA(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
SUM_IN_GGA(.(0, XS), YS, ZS) → U2_GGA(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_GA(N, M, XS, X, weight_in_ga(YS, X))
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
WEIGHT_IN_GA(.(N, .(M, XS)), X) → SUM_IN_GGA(.(N, .(M, XS)), .(0, XS), YS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → U1_GGA(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
SUM_IN_GGA(.(0, XS), YS, ZS) → U2_GGA(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_GA(N, M, XS, X, weight_in_ga(YS, X))
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
SUM_IN_GGA(.(0, XS), YS) → SUM_IN_GGA(XS, YS)
SUM_IN_GGA(.(s(N), XS), .(M, YS)) → SUM_IN_GGA(.(N, XS), .(s(M), YS))
No rules are removed from R.
SUM_IN_GGA(.(0, XS), YS) → SUM_IN_GGA(XS, YS)
POL(.(x1, x2)) = 2·x1 + 2·x2
POL(0) = 0
POL(SUM_IN_GGA(x1, x2)) = x1 + 2·x2
POL(s(x1)) = x1
SUM_IN_GGA(.(s(N), XS), .(M, YS)) → SUM_IN_GGA(.(N, XS), .(s(M), YS))
SUM_IN_GGA(.(s(N), XS), .(M, YS)) → SUM_IN_GGA(.(N, XS), .(s(M), YS))
POL(.(x1, x2)) = 2·x1 + x2
POL(SUM_IN_GGA(x1, x2)) = 2·x1 + x2
POL(s(x1)) = 2 + x1
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U3_GA(sum_out_gga(YS)) → WEIGHT_IN_GA(YS)
WEIGHT_IN_GA(.(N, .(M, XS))) → U3_GA(sum_in_gga(.(N, .(M, XS)), .(0, XS)))
sum_in_gga(.(s(N), XS), .(M, YS)) → U1_gga(sum_in_gga(.(N, XS), .(s(M), YS)))
sum_in_gga(.(0, XS), YS) → U2_gga(sum_in_gga(XS, YS))
U1_gga(sum_out_gga(ZS)) → sum_out_gga(ZS)
U2_gga(sum_out_gga(ZS)) → sum_out_gga(ZS)
sum_in_gga([], YS) → sum_out_gga(YS)
sum_in_gga(x0, x1)
U1_gga(x0)
U2_gga(x0)
The following rules are removed from R:
WEIGHT_IN_GA(.(N, .(M, XS))) → U3_GA(sum_in_gga(.(N, .(M, XS)), .(0, XS)))
Used ordering: POLO with Polynomial interpretation [POLO]:
sum_in_gga([], YS) → sum_out_gga(YS)
POL(.(x1, x2)) = 2·x1 + 2·x2
POL(0) = 0
POL(U1_gga(x1)) = x1
POL(U2_gga(x1)) = x1
POL(U3_GA(x1)) = x1
POL(WEIGHT_IN_GA(x1)) = 1 + 2·x1
POL([]) = 1
POL(s(x1)) = x1
POL(sum_in_gga(x1, x2)) = x1 + 2·x2
POL(sum_out_gga(x1)) = 1 + 2·x1
U3_GA(sum_out_gga(YS)) → WEIGHT_IN_GA(YS)
sum_in_gga(.(s(N), XS), .(M, YS)) → U1_gga(sum_in_gga(.(N, XS), .(s(M), YS)))
sum_in_gga(.(0, XS), YS) → U2_gga(sum_in_gga(XS, YS))
U2_gga(sum_out_gga(ZS)) → sum_out_gga(ZS)
U1_gga(sum_out_gga(ZS)) → sum_out_gga(ZS)
sum_in_gga(x0, x1)
U1_gga(x0)
U2_gga(x0)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
WEIGHT_IN_GA(.(N, .(M, XS)), X) → SUM_IN_GGA(.(N, .(M, XS)), .(0, XS), YS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → U1_GGA(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
SUM_IN_GGA(.(0, XS), YS, ZS) → U2_GGA(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_GA(N, M, XS, X, weight_in_ga(YS, X))
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
WEIGHT_IN_GA(.(N, .(M, XS)), X) → SUM_IN_GGA(.(N, .(M, XS)), .(0, XS), YS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → U1_GGA(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
SUM_IN_GGA(.(0, XS), YS, ZS) → U2_GGA(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_GA(N, M, XS, X, weight_in_ga(YS, X))
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
SUM_IN_GGA(.(0, XS), YS, ZS) → SUM_IN_GGA(XS, YS, ZS)
SUM_IN_GGA(.(s(N), XS), .(M, YS), ZS) → SUM_IN_GGA(.(N, XS), .(s(M), YS), ZS)
SUM_IN_GGA(.(0, XS), YS) → SUM_IN_GGA(XS, YS)
SUM_IN_GGA(.(s(N), XS), .(M, YS)) → SUM_IN_GGA(.(N, XS), .(s(M), YS))
No rules are removed from R.
SUM_IN_GGA(.(0, XS), YS) → SUM_IN_GGA(XS, YS)
POL(.(x1, x2)) = 2·x1 + 2·x2
POL(0) = 0
POL(SUM_IN_GGA(x1, x2)) = x1 + 2·x2
POL(s(x1)) = x1
SUM_IN_GGA(.(s(N), XS), .(M, YS)) → SUM_IN_GGA(.(N, XS), .(s(M), YS))
SUM_IN_GGA(.(s(N), XS), .(M, YS)) → SUM_IN_GGA(.(N, XS), .(s(M), YS))
POL(.(x1, x2)) = 2·x1 + x2
POL(SUM_IN_GGA(x1, x2)) = 2·x1 + x2
POL(s(x1)) = 2 + x1
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
weight_in_ga(.(N, .(M, XS)), X) → U3_ga(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U3_ga(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → U4_ga(N, M, XS, X, weight_in_ga(YS, X))
weight_in_ga(.(X, []), X) → weight_out_ga(.(X, []), X)
U4_ga(N, M, XS, X, weight_out_ga(YS, X)) → weight_out_ga(.(N, .(M, XS)), X)
U3_GA(N, M, XS, X, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS, X)
WEIGHT_IN_GA(.(N, .(M, XS)), X) → U3_GA(N, M, XS, X, sum_in_gga(.(N, .(M, XS)), .(0, XS), YS))
sum_in_gga(.(s(N), XS), .(M, YS), ZS) → U1_gga(N, XS, M, YS, ZS, sum_in_gga(.(N, XS), .(s(M), YS), ZS))
sum_in_gga(.(0, XS), YS, ZS) → U2_gga(XS, YS, ZS, sum_in_gga(XS, YS, ZS))
U1_gga(N, XS, M, YS, ZS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U2_gga(XS, YS, ZS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
sum_in_gga([], YS, YS) → sum_out_gga([], YS, YS)
U3_GA(N, M, XS, sum_out_gga(.(N, .(M, XS)), .(0, XS), YS)) → WEIGHT_IN_GA(YS)
WEIGHT_IN_GA(.(N, .(M, XS))) → U3_GA(N, M, XS, sum_in_gga(.(N, .(M, XS)), .(0, XS)))
sum_in_gga(.(s(N), XS), .(M, YS)) → U1_gga(N, XS, M, YS, sum_in_gga(.(N, XS), .(s(M), YS)))
sum_in_gga(.(0, XS), YS) → U2_gga(XS, YS, sum_in_gga(XS, YS))
U1_gga(N, XS, M, YS, sum_out_gga(.(N, XS), .(s(M), YS), ZS)) → sum_out_gga(.(s(N), XS), .(M, YS), ZS)
U2_gga(XS, YS, sum_out_gga(XS, YS, ZS)) → sum_out_gga(.(0, XS), YS, ZS)
sum_in_gga([], YS) → sum_out_gga([], YS, YS)
sum_in_gga(x0, x1)
U1_gga(x0, x1, x2, x3, x4)
U2_gga(x0, x1, x2)