*** 1 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(0(),x)))
weight(cons(n,nil())) -> n
Weak DP Rules:
Weak TRS Rules:
Signature:
{sum/2,weight/1} / {0/0,cons/2,nil/0,s/1}
Obligation:
Innermost
basic terms: {sum,weight}/{0,cons,nil,s}
Applied Processor:
DependencyPairs {dpKind_ = DT}
Proof:
We add the following dependency tuples:
Strict DPs
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
sum#(nil(),y) -> c_3()
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
weight#(cons(n,nil())) -> c_5()
Weak DPs
and mark the set of starting terms.
*** 1.1 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
sum#(nil(),y) -> c_3()
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
weight#(cons(n,nil())) -> c_5()
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
weight(cons(n,cons(m,x))) -> weight(sum(cons(n,cons(m,x)),cons(0(),x)))
weight(cons(n,nil())) -> n
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
UsableRules
Proof:
We replace rewrite rules by usable rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
sum#(nil(),y) -> c_3()
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
weight#(cons(n,nil())) -> c_5()
*** 1.1.1 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
sum#(nil(),y) -> c_3()
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
weight#(cons(n,nil())) -> c_5()
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
PredecessorEstimation {onSelection = all simple predecessor estimation selector}
Proof:
We estimate the number of application of
{3,5}
by application of
Pre({3,5}) = {1,4}.
Here rules are labelled as follows:
1: sum#(cons(0(),x),y) ->
c_1(sum#(x,y))
2: sum#(cons(s(n),x),cons(m,y)) ->
c_2(sum#(cons(n,x)
,cons(s(m),y)))
3: sum#(nil(),y) -> c_3()
4: weight#(cons(n,cons(m,x))) ->
c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x)))
,sum#(cons(n,cons(m,x))
,cons(0(),x)))
5: weight#(cons(n,nil())) -> c_5()
*** 1.1.1.1 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
sum#(nil(),y) -> c_3()
weight#(cons(n,nil())) -> c_5()
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
RemoveWeakSuffixes
Proof:
Consider the dependency graph
1:S:sum#(cons(0(),x),y) -> c_1(sum#(x,y))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):2
-->_1 sum#(nil(),y) -> c_3():4
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):1
2:S:sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):2
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):1
3:S:weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
-->_1 weight#(cons(n,nil())) -> c_5():5
-->_1 weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x))):3
-->_2 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):2
-->_2 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):1
4:W:sum#(nil(),y) -> c_3()
5:W:weight#(cons(n,nil())) -> c_5()
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
5: weight#(cons(n,nil())) -> c_5()
4: sum#(nil(),y) -> c_3()
*** 1.1.1.1.1 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
Decompose {onSelection = all cycle independent sub-graph, withBound = RelativeAdd}
Proof:
We analyse the complexity of following sub-problems (R) and (S).
Problem (S) is obtained from the input problem by shifting strict rules from (R) into the weak component.
Problem (R)
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Problem (S)
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
*** 1.1.1.1.1.1 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}}
Proof:
We first use the processor NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly:
1: sum#(cons(0(),x),y) ->
c_1(sum#(x,y))
The strictly oriented rules are moved into the weak component.
*** 1.1.1.1.1.1.1 Progress [(?,O(n^2))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy}
Proof:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_1) = {1},
uargs(c_2) = {1},
uargs(c_4) = {1,2}
Following symbols are considered usable:
{sum,sum#,weight#}
TcT has computed the following interpretation:
p(0) = [0]
[1]
p(cons) = [0 2] x1 + [1 2] x2 + [2]
[0 1] [0 1] [0]
p(nil) = [0]
[1]
p(s) = [0 0] x1 + [1]
[0 1] [0]
p(sum) = [0 1] x1 + [1 0] x2 + [0]
[0 0] [1 1] [0]
p(weight) = [1 0] x1 + [0]
[2 2] [1]
p(sum#) = [0 1] x1 + [0]
[1 1] [1]
p(weight#) = [1 0] x1 + [0]
[1 0] [0]
p(c_1) = [1 0] x1 + [0]
[0 0] [0]
p(c_2) = [1 0] x1 + [0]
[0 1] [0]
p(c_3) = [0]
[2]
p(c_4) = [1 0] x1 + [1 0] x2 + [0]
[0 0] [0 0] [0]
p(c_5) = [0]
[2]
Following rules are strictly oriented:
sum#(cons(0(),x),y) = [0 1] x + [1]
[1 3] [6]
> [0 1] x + [0]
[0 0] [0]
= c_1(sum#(x,y))
Following rules are (at-least) weakly oriented:
sum#(cons(s(n),x),cons(m,y)) = [0 1] n + [0 1] x + [0]
[0 3] [1 3] [3]
>= [0 1] n + [0 1] x + [0]
[0 3] [1 3] [3]
= c_2(sum#(cons(n,x)
,cons(s(m),y)))
weight#(cons(n,cons(m,x))) = [0 4] m + [0 2] n + [1
4] x + [4]
[0 4] [0 2] [1
4] [4]
>= [0 2] m + [0 2] n + [1
4] x + [4]
[0 0] [0 0] [0
0] [0]
= c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x)))
,sum#(cons(n,cons(m,x))
,cons(0(),x)))
sum(cons(0(),x),y) = [0 1] x + [1 0] y + [1]
[0 0] [1 1] [0]
>= [0 1] x + [1 0] y + [0]
[0 0] [1 1] [0]
= sum(x,y)
sum(cons(s(n),x),cons(m,y)) = [0 2] m + [0 1] n + [0 1] x + [1
2] y + [2]
[0 3] [0 0] [0 0] [1
3] [2]
>= [0 2] m + [0 1] n + [0 1] x + [1
2] y + [2]
[0 3] [0 0] [0 0] [1
3] [2]
= sum(cons(n,x),cons(s(m),y))
sum(nil(),y) = [1 0] y + [1]
[1 1] [0]
>= [1 0] y + [0]
[0 1] [0]
= y
*** 1.1.1.1.1.1.1.1 Progress [(?,O(1))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
Assumption
Proof:
()
*** 1.1.1.1.1.1.2 Progress [(?,O(n^3))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
DecomposeDG {onSelection = all below first cut in WDG, onUpper = Just someStrategy, onLower = Nothing}
Proof:
We decompose the input problem according to the dependency graph into the upper component
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
and a lower component
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Further, following extension rules are added to the lower component.
weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x))
weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x)))
*** 1.1.1.1.1.1.2.1 Progress [(?,O(n^1))] ***
Considered Problem:
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}}
Proof:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly:
1: weight#(cons(n,cons(m,x))) ->
c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x)))
,sum#(cons(n,cons(m,x))
,cons(0(),x)))
The strictly oriented rules are moved into the weak component.
*** 1.1.1.1.1.1.2.1.1 Progress [(?,O(n^1))] ***
Considered Problem:
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy}
Proof:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_4) = {1}
Following symbols are considered usable:
{sum,sum#,weight#}
TcT has computed the following interpretation:
p(0) = [2]
p(cons) = [1] x2 + [1]
p(nil) = [1]
p(s) = [1] x1 + [8]
p(sum) = [1] x2 + [0]
p(weight) = [1] x1 + [1]
p(sum#) = [0]
p(weight#) = [2] x1 + [0]
p(c_1) = [1]
p(c_2) = [1] x1 + [4]
p(c_3) = [2]
p(c_4) = [1] x1 + [1]
p(c_5) = [1]
Following rules are strictly oriented:
weight#(cons(n,cons(m,x))) = [2] x + [4]
> [2] x + [3]
= c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x)))
,sum#(cons(n,cons(m,x))
,cons(0(),x)))
Following rules are (at-least) weakly oriented:
sum(cons(0(),x),y) = [1] y + [0]
>= [1] y + [0]
= sum(x,y)
sum(cons(s(n),x),cons(m,y)) = [1] y + [1]
>= [1] y + [1]
= sum(cons(n,x),cons(s(m),y))
sum(nil(),y) = [1] y + [0]
>= [1] y + [0]
= y
*** 1.1.1.1.1.1.2.1.1.1 Progress [(?,O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
Assumption
Proof:
()
*** 1.1.1.1.1.1.2.1.2 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
RemoveWeakSuffixes
Proof:
Consider the dependency graph
1:W:weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
-->_1 weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: weight#(cons(n,cons(m,x))) ->
c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x)))
,sum#(cons(n,cons(m,x))
,cons(0(),x)))
*** 1.1.1.1.1.1.2.1.2.1 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
EmptyProcessor
Proof:
The problem is already closed. The intended complexity is O(1).
*** 1.1.1.1.1.1.2.2 Progress [(?,O(n^2))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x))
weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}}
Proof:
We first use the processor NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly:
1: sum#(cons(s(n),x),cons(m,y)) ->
c_2(sum#(cons(n,x)
,cons(s(m),y)))
The strictly oriented rules are moved into the weak component.
*** 1.1.1.1.1.1.2.2.1 Progress [(?,O(n^2))] ***
Considered Problem:
Strict DP Rules:
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x))
weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
NaturalMI {miDimension = 2, miDegree = 2, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy}
Proof:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_1) = {1},
uargs(c_2) = {1}
Following symbols are considered usable:
{sum,sum#,weight#}
TcT has computed the following interpretation:
p(0) = [1]
[0]
p(cons) = [1 1] x1 + [1 2] x2 + [1]
[0 1] [0 1] [0]
p(nil) = [0]
[2]
p(s) = [1 0] x1 + [0]
[0 1] [2]
p(sum) = [0 1] x1 + [1 0] x2 + [0]
[0 1] [0 1] [0]
p(weight) = [0 0] x1 + [2]
[0 1] [0]
p(sum#) = [0 2] x1 + [0]
[0 1] [0]
p(weight#) = [1 1] x1 + [3]
[1 0] [0]
p(c_1) = [1 0] x1 + [0]
[0 0] [0]
p(c_2) = [1 0] x1 + [0]
[0 0] [0]
p(c_3) = [0]
[0]
p(c_4) = [1 1] x1 + [0]
[0 0] [0]
p(c_5) = [0]
[0]
Following rules are strictly oriented:
sum#(cons(s(n),x),cons(m,y)) = [0 2] n + [0 2] x + [4]
[0 1] [0 1] [2]
> [0 2] n + [0 2] x + [0]
[0 0] [0 0] [0]
= c_2(sum#(cons(n,x)
,cons(s(m),y)))
Following rules are (at-least) weakly oriented:
sum#(cons(0(),x),y) = [0 2] x + [0]
[0 1] [0]
>= [0 2] x + [0]
[0 0] [0]
= c_1(sum#(x,y))
weight#(cons(n,cons(m,x))) = [1 4] m + [1 2] n + [1
5] x + [5]
[1 3] [1 1] [1
4] [2]
>= [0 2] m + [0 2] n + [0
2] x + [0]
[0 1] [0 1] [0
1] [0]
= sum#(cons(n,cons(m,x))
,cons(0(),x))
weight#(cons(n,cons(m,x))) = [1 4] m + [1 2] n + [1
5] x + [5]
[1 3] [1 1] [1
4] [2]
>= [0 2] m + [0 2] n + [1
5] x + [5]
[0 1] [0 1] [1
3] [2]
= weight#(sum(cons(n,cons(m,x))
,cons(0(),x)))
sum(cons(0(),x),y) = [0 1] x + [1 0] y + [0]
[0 1] [0 1] [0]
>= [0 1] x + [1 0] y + [0]
[0 1] [0 1] [0]
= sum(x,y)
sum(cons(s(n),x),cons(m,y)) = [1 1] m + [0 1] n + [0 1] x + [1
2] y + [3]
[0 1] [0 1] [0 1] [0
1] [2]
>= [1 1] m + [0 1] n + [0 1] x + [1
2] y + [3]
[0 1] [0 1] [0 1] [0
1] [2]
= sum(cons(n,x),cons(s(m),y))
sum(nil(),y) = [1 0] y + [2]
[0 1] [2]
>= [1 0] y + [0]
[0 1] [0]
= y
*** 1.1.1.1.1.1.2.2.1.1 Progress [(?,O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x))
weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
Assumption
Proof:
()
*** 1.1.1.1.1.1.2.2.2 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x))
weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
RemoveWeakSuffixes
Proof:
Consider the dependency graph
1:W:sum#(cons(0(),x),y) -> c_1(sum#(x,y))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):2
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):1
2:W:sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):2
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):1
3:W:weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):2
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):1
4:W:weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x)))
-->_1 weight#(cons(n,cons(m,x))) -> weight#(sum(cons(n,cons(m,x)),cons(0(),x))):4
-->_1 weight#(cons(n,cons(m,x))) -> sum#(cons(n,cons(m,x)),cons(0(),x)):3
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
4: weight#(cons(n,cons(m,x))) ->
weight#(sum(cons(n,cons(m,x))
,cons(0(),x)))
3: weight#(cons(n,cons(m,x))) ->
sum#(cons(n,cons(m,x))
,cons(0(),x))
1: sum#(cons(0(),x),y) ->
c_1(sum#(x,y))
2: sum#(cons(s(n),x),cons(m,y)) ->
c_2(sum#(cons(n,x)
,cons(s(m),y)))
*** 1.1.1.1.1.1.2.2.2.1 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
EmptyProcessor
Proof:
The problem is already closed. The intended complexity is O(1).
*** 1.1.1.1.1.2 Progress [(?,O(n^1))] ***
Considered Problem:
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
sum#(cons(0(),x),y) -> c_1(sum#(x,y))
sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
RemoveWeakSuffixes
Proof:
Consider the dependency graph
1:S:weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
-->_2 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):3
-->_2 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):2
-->_1 weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x))):1
2:W:sum#(cons(0(),x),y) -> c_1(sum#(x,y))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):3
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):2
3:W:sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y)))
-->_1 sum#(cons(s(n),x),cons(m,y)) -> c_2(sum#(cons(n,x),cons(s(m),y))):3
-->_1 sum#(cons(0(),x),y) -> c_1(sum#(x,y)):2
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
3: sum#(cons(s(n),x),cons(m,y)) ->
c_2(sum#(cons(n,x)
,cons(s(m),y)))
2: sum#(cons(0(),x),y) ->
c_1(sum#(x,y))
*** 1.1.1.1.1.2.1 Progress [(?,O(n^1))] ***
Considered Problem:
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/2,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
SimplifyRHS
Proof:
Consider the dependency graph
1:S:weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x)))
-->_1 weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))),sum#(cons(n,cons(m,x)),cons(0(),x))):1
Due to missing edges in the depndency graph, the right-hand sides of following rules could be simplified:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))))
*** 1.1.1.1.1.2.1.1 Progress [(?,O(n^1))] ***
Considered Problem:
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))))
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/1,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
PredecessorEstimationCP {onSelectionCP = any intersect of rules of CDG leaf and strict-rules, withComplexityPair = NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy}}
Proof:
We first use the processor NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Nothing, greedy = NoGreedy} to orient following rules strictly:
1: weight#(cons(n,cons(m,x))) ->
c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x))))
The strictly oriented rules are moved into the weak component.
*** 1.1.1.1.1.2.1.1.1 Progress [(?,O(n^1))] ***
Considered Problem:
Strict DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))))
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/1,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
NaturalMI {miDimension = 1, miDegree = 1, miKind = Algebraic, uargs = UArgs, urules = URules, selector = Just first alternative for predecessorEstimation any intersect of rules of CDG leaf and strict-rules, greedy = NoGreedy}
Proof:
We apply a matrix interpretation of kind constructor based matrix interpretation:
The following argument positions are considered usable:
uargs(c_4) = {1}
Following symbols are considered usable:
{sum,sum#,weight#}
TcT has computed the following interpretation:
p(0) = [1]
p(cons) = [1] x2 + [1]
p(nil) = [1]
p(s) = [0]
p(sum) = [1] x2 + [0]
p(weight) = [1]
p(sum#) = [1] x1 + [1] x2 + [0]
p(weight#) = [8] x1 + [12]
p(c_1) = [1]
p(c_2) = [1]
p(c_3) = [1]
p(c_4) = [1] x1 + [3]
p(c_5) = [0]
Following rules are strictly oriented:
weight#(cons(n,cons(m,x))) = [8] x + [28]
> [8] x + [23]
= c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x))))
Following rules are (at-least) weakly oriented:
sum(cons(0(),x),y) = [1] y + [0]
>= [1] y + [0]
= sum(x,y)
sum(cons(s(n),x),cons(m,y)) = [1] y + [1]
>= [1] y + [1]
= sum(cons(n,x),cons(s(m),y))
sum(nil(),y) = [1] y + [0]
>= [1] y + [0]
= y
*** 1.1.1.1.1.2.1.1.1.1 Progress [(?,O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/1,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
Assumption
Proof:
()
*** 1.1.1.1.1.2.1.1.2 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))))
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/1,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
RemoveWeakSuffixes
Proof:
Consider the dependency graph
1:W:weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x))))
-->_1 weight#(cons(n,cons(m,x))) -> c_4(weight#(sum(cons(n,cons(m,x)),cons(0(),x)))):1
The following weak DPs constitute a sub-graph of the DG that is closed under successors. The DPs are removed.
1: weight#(cons(n,cons(m,x))) ->
c_4(weight#(sum(cons(n
,cons(m,x))
,cons(0(),x))))
*** 1.1.1.1.1.2.1.1.2.1 Progress [(O(1),O(1))] ***
Considered Problem:
Strict DP Rules:
Strict TRS Rules:
Weak DP Rules:
Weak TRS Rules:
sum(cons(0(),x),y) -> sum(x,y)
sum(cons(s(n),x),cons(m,y)) -> sum(cons(n,x),cons(s(m),y))
sum(nil(),y) -> y
Signature:
{sum/2,weight/1,sum#/2,weight#/1} / {0/0,cons/2,nil/0,s/1,c_1/1,c_2/1,c_3/0,c_4/1,c_5/0}
Obligation:
Innermost
basic terms: {sum#,weight#}/{0,cons,nil,s}
Applied Processor:
EmptyProcessor
Proof:
The problem is already closed. The intended complexity is O(1).