↳ PROLOG
↳ PrologToPiTRSProof
With regard to the inferred argument filtering the predicates were used in the following modes:
weight2: (b,f)
sum3: (b,b,f)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
weight_2_in_ga2(._22(N, ._22(M, XS)), X) -> if_weight_2_in_1_ga5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_weight_2_in_1_ga5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
weight_2_in_ga2(._22(X, []_0), X) -> weight_2_out_ga2(._22(X, []_0), X)
if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_out_ga2(YS, X)) -> weight_2_out_ga2(._22(N, ._22(M, XS)), X)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
weight_2_in_ga2(._22(N, ._22(M, XS)), X) -> if_weight_2_in_1_ga5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_weight_2_in_1_ga5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
weight_2_in_ga2(._22(X, []_0), X) -> weight_2_out_ga2(._22(X, []_0), X)
if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_out_ga2(YS, X)) -> weight_2_out_ga2(._22(N, ._22(M, XS)), X)
WEIGHT_2_IN_GA2(._22(N, ._22(M, XS)), X) -> IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
WEIGHT_2_IN_GA2(._22(N, ._22(M, XS)), X) -> SUM_3_IN_GGA3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)
SUM_3_IN_GGA3(._22(s_11(N), XS), ._22(M, YS), ZS) -> IF_SUM_3_IN_1_GGA6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
SUM_3_IN_GGA3(._22(s_11(N), XS), ._22(M, YS), ZS) -> SUM_3_IN_GGA3(._22(N, XS), ._22(s_11(M), YS), ZS)
SUM_3_IN_GGA3(._22(0_0, XS), YS, ZS) -> IF_SUM_3_IN_2_GGA4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
SUM_3_IN_GGA3(._22(0_0, XS), YS, ZS) -> SUM_3_IN_GGA3(XS, YS, ZS)
IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> IF_WEIGHT_2_IN_2_GA6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> WEIGHT_2_IN_GA2(YS, X)
weight_2_in_ga2(._22(N, ._22(M, XS)), X) -> if_weight_2_in_1_ga5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_weight_2_in_1_ga5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
weight_2_in_ga2(._22(X, []_0), X) -> weight_2_out_ga2(._22(X, []_0), X)
if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_out_ga2(YS, X)) -> weight_2_out_ga2(._22(N, ._22(M, XS)), X)
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
WEIGHT_2_IN_GA2(._22(N, ._22(M, XS)), X) -> IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
WEIGHT_2_IN_GA2(._22(N, ._22(M, XS)), X) -> SUM_3_IN_GGA3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)
SUM_3_IN_GGA3(._22(s_11(N), XS), ._22(M, YS), ZS) -> IF_SUM_3_IN_1_GGA6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
SUM_3_IN_GGA3(._22(s_11(N), XS), ._22(M, YS), ZS) -> SUM_3_IN_GGA3(._22(N, XS), ._22(s_11(M), YS), ZS)
SUM_3_IN_GGA3(._22(0_0, XS), YS, ZS) -> IF_SUM_3_IN_2_GGA4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
SUM_3_IN_GGA3(._22(0_0, XS), YS, ZS) -> SUM_3_IN_GGA3(XS, YS, ZS)
IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> IF_WEIGHT_2_IN_2_GA6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> WEIGHT_2_IN_GA2(YS, X)
weight_2_in_ga2(._22(N, ._22(M, XS)), X) -> if_weight_2_in_1_ga5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_weight_2_in_1_ga5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
weight_2_in_ga2(._22(X, []_0), X) -> weight_2_out_ga2(._22(X, []_0), X)
if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_out_ga2(YS, X)) -> weight_2_out_ga2(._22(N, ._22(M, XS)), X)
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
SUM_3_IN_GGA3(._22(0_0, XS), YS, ZS) -> SUM_3_IN_GGA3(XS, YS, ZS)
SUM_3_IN_GGA3(._22(s_11(N), XS), ._22(M, YS), ZS) -> SUM_3_IN_GGA3(._22(N, XS), ._22(s_11(M), YS), ZS)
weight_2_in_ga2(._22(N, ._22(M, XS)), X) -> if_weight_2_in_1_ga5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_weight_2_in_1_ga5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
weight_2_in_ga2(._22(X, []_0), X) -> weight_2_out_ga2(._22(X, []_0), X)
if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_out_ga2(YS, X)) -> weight_2_out_ga2(._22(N, ._22(M, XS)), X)
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ PiDP
SUM_3_IN_GGA3(._22(0_0, XS), YS, ZS) -> SUM_3_IN_GGA3(XS, YS, ZS)
SUM_3_IN_GGA3(._22(s_11(N), XS), ._22(M, YS), ZS) -> SUM_3_IN_GGA3(._22(N, XS), ._22(s_11(M), YS), ZS)
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
↳ PiDP
SUM_3_IN_GGA2(._22(0_0, XS), YS) -> SUM_3_IN_GGA2(XS, YS)
SUM_3_IN_GGA2(._22(s_11(N), XS), ._22(M, YS)) -> SUM_3_IN_GGA2(._22(N, XS), ._22(s_11(M), YS))
Order:Homeomorphic Embedding Order
AFS:
0_0 = 0_0
s_11(x1) = s_11(x1)
._22(x1, x2) = ._22(x1, x2)
From the DPs we obtained the following set of size-change graphs:
We oriented the following set of usable rules.
none
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
WEIGHT_2_IN_GA2(._22(N, ._22(M, XS)), X) -> IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> WEIGHT_2_IN_GA2(YS, X)
weight_2_in_ga2(._22(N, ._22(M, XS)), X) -> if_weight_2_in_1_ga5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_weight_2_in_1_ga5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_in_ga2(YS, X))
weight_2_in_ga2(._22(X, []_0), X) -> weight_2_out_ga2(._22(X, []_0), X)
if_weight_2_in_2_ga6(N, M, XS, X, YS, weight_2_out_ga2(YS, X)) -> weight_2_out_ga2(._22(N, ._22(M, XS)), X)
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
WEIGHT_2_IN_GA2(._22(N, ._22(M, XS)), X) -> IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_in_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS))
IF_WEIGHT_2_IN_1_GA5(N, M, XS, X, sum_3_out_gga3(._22(N, ._22(M, XS)), ._22(0_0, XS), YS)) -> WEIGHT_2_IN_GA2(YS, X)
sum_3_in_gga3(._22(s_11(N), XS), ._22(M, YS), ZS) -> if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_in_gga3(._22(N, XS), ._22(s_11(M), YS), ZS))
sum_3_in_gga3(._22(0_0, XS), YS, ZS) -> if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_in_gga3(XS, YS, ZS))
if_sum_3_in_1_gga6(N, XS, M, YS, ZS, sum_3_out_gga3(._22(N, XS), ._22(s_11(M), YS), ZS)) -> sum_3_out_gga3(._22(s_11(N), XS), ._22(M, YS), ZS)
if_sum_3_in_2_gga4(XS, YS, ZS, sum_3_out_gga3(XS, YS, ZS)) -> sum_3_out_gga3(._22(0_0, XS), YS, ZS)
sum_3_in_gga3([]_0, YS, YS) -> sum_3_out_gga3([]_0, YS, YS)
↳ PROLOG
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ AND
↳ PiDP
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
WEIGHT_2_IN_GA1(._22(N, ._22(M, XS))) -> IF_WEIGHT_2_IN_1_GA1(sum_3_in_gga2(._22(N, ._22(M, XS)), ._22(0_0, XS)))
IF_WEIGHT_2_IN_1_GA1(sum_3_out_gga1(YS)) -> WEIGHT_2_IN_GA1(YS)
sum_3_in_gga2(._22(s_11(N), XS), ._22(M, YS)) -> if_sum_3_in_1_gga1(sum_3_in_gga2(._22(N, XS), ._22(s_11(M), YS)))
sum_3_in_gga2(._22(0_0, XS), YS) -> if_sum_3_in_2_gga1(sum_3_in_gga2(XS, YS))
if_sum_3_in_1_gga1(sum_3_out_gga1(ZS)) -> sum_3_out_gga1(ZS)
if_sum_3_in_2_gga1(sum_3_out_gga1(ZS)) -> sum_3_out_gga1(ZS)
sum_3_in_gga2([]_0, YS) -> sum_3_out_gga1(YS)
sum_3_in_gga2(x0, x1)
if_sum_3_in_1_gga1(x0)
if_sum_3_in_2_gga1(x0)
Order:Polynomial interpretation:
POL(0_0) = 1
POL(._22(x1, x2)) = 1 + x2
POL(sum_3_out_gga1(x1)) = x1
POL(if_sum_3_in_1_gga1(x1)) = x1
POL(if_sum_3_in_2_gga1(x1)) = x1
POL(sum_3_in_gga2(x1, x2)) = x2
POL(s_11(x1)) = 0
POL([]_0) = 0
From the DPs we obtained the following set of size-change graphs:
We oriented the following set of usable rules.
sum_3_in_gga2([]_0, YS) -> sum_3_out_gga1(YS)
sum_3_in_gga2(._22(s_11(N), XS), ._22(M, YS)) -> if_sum_3_in_1_gga1(sum_3_in_gga2(._22(N, XS), ._22(s_11(M), YS)))
sum_3_in_gga2(._22(0_0, XS), YS) -> if_sum_3_in_2_gga1(sum_3_in_gga2(XS, YS))
if_sum_3_in_2_gga1(sum_3_out_gga1(ZS)) -> sum_3_out_gga1(ZS)
if_sum_3_in_1_gga1(sum_3_out_gga1(ZS)) -> sum_3_out_gga1(ZS)