Term Rewriting System R:
[n, x, m, y]
sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

SUM(cons(s(n), x), cons(m, y)) -> SUM(cons(n, x), cons(s(m), y))
SUM(cons(0, x), y) -> SUM(x, y)
WEIGHT(cons(n, cons(m, x))) -> WEIGHT(sum(cons(n, cons(m, x)), cons(0, x)))
WEIGHT(cons(n, cons(m, x))) -> SUM(cons(n, cons(m, x)), cons(0, x))

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Argument Filtering and Ordering
       →DP Problem 2
Remaining


Dependency Pairs:

SUM(cons(0, x), y) -> SUM(x, y)
SUM(cons(s(n), x), cons(m, y)) -> SUM(cons(n, x), cons(s(m), y))


Rules:


sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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





The following dependency pair can be strictly oriented:

SUM(cons(0, x), y) -> SUM(x, y)


The following rules can be oriented:

sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(SUM(x1, x2))=  1 + x1 + x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  1 + x1 + x2  
  POL(nil)=  1  
  POL(s(x1))=  x1  
  POL(weight(x1))=  1 + x1  

resulting in one new DP problem.
Used Argument Filtering System:
SUM(x1, x2) -> SUM(x1, x2)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)
sum(x1, x2) -> x2
weight(x1) -> weight(x1)


   R
DPs
       →DP Problem 1
AFS
           →DP Problem 3
Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

SUM(cons(s(n), x), cons(m, y)) -> SUM(cons(n, x), cons(s(m), y))


Rules:


sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

SUM(cons(s(n), x), cons(m, y)) -> SUM(cons(n, x), cons(s(m), y))
one new Dependency Pair is created:

SUM(cons(s(n''), x''), cons(s(m''), y'')) -> SUM(cons(n'', x''), cons(s(s(m'')), y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
           →DP Problem 3
Inst
             ...
               →DP Problem 4
Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

SUM(cons(s(n''), x''), cons(s(m''), y'')) -> SUM(cons(n'', x''), cons(s(s(m'')), y''))


Rules:


sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

SUM(cons(s(n''), x''), cons(s(m''), y'')) -> SUM(cons(n'', x''), cons(s(s(m'')), y''))
one new Dependency Pair is created:

SUM(cons(s(n''''), x''''), cons(s(s(m'''')), y'''')) -> SUM(cons(n'''', x''''), cons(s(s(s(m''''))), y''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
           →DP Problem 3
Inst
             ...
               →DP Problem 5
Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

SUM(cons(s(n''''), x''''), cons(s(s(m'''')), y'''')) -> SUM(cons(n'''', x''''), cons(s(s(s(m''''))), y''''))


Rules:


sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

SUM(cons(s(n''''), x''''), cons(s(s(m'''')), y'''')) -> SUM(cons(n'''', x''''), cons(s(s(s(m''''))), y''''))
one new Dependency Pair is created:

SUM(cons(s(n''''''), x''''''), cons(s(s(s(m''''''))), y'''''')) -> SUM(cons(n'''''', x''''''), cons(s(s(s(s(m'''''')))), y''''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
           →DP Problem 3
Inst
             ...
               →DP Problem 6
Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

SUM(cons(s(n''''''), x''''''), cons(s(s(s(m''''''))), y'''''')) -> SUM(cons(n'''''', x''''''), cons(s(s(s(s(m'''''')))), y''''''))


Rules:


sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

SUM(cons(s(n''''''), x''''''), cons(s(s(s(m''''''))), y'''''')) -> SUM(cons(n'''''', x''''''), cons(s(s(s(s(m'''''')))), y''''''))
one new Dependency Pair is created:

SUM(cons(s(n''''''''), x''''''''), cons(s(s(s(s(m'''''''')))), y'''''''')) -> SUM(cons(n'''''''', x''''''''), cons(s(s(s(s(s(m''''''''))))), y''''''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
           →DP Problem 3
Inst
             ...
               →DP Problem 7
Instantiation Transformation
       →DP Problem 2
Remaining


Dependency Pair:

SUM(cons(s(n''''''''), x''''''''), cons(s(s(s(s(m'''''''')))), y'''''''')) -> SUM(cons(n'''''''', x''''''''), cons(s(s(s(s(s(m''''''''))))), y''''''''))


Rules:


sum(cons(s(n), x), cons(m, y)) -> sum(cons(n, x), cons(s(m), y))
sum(cons(0, x), y) -> sum(x, 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





On this DP problem, an Instantiation SCC transformation can be performed.
As a result of transforming the rule

SUM(cons(s(n''''''''), x''''''''), cons(s(s(s(s(m'''''''')))), y'''''''')) -> SUM(cons(n'''''''', x''''''''), cons(s(s(s(s(s(m''''''''))))), y''''''''))
one new Dependency Pair is created:

SUM(cons(s(n''''''''''), x''''''''''), cons(s(s(s(s(s(m''''''''''))))), y'''''''''')) -> SUM(cons(n'''''''''', x''''''''''), cons(s(s(s(s(s(s(m'''''''''')))))), y''''''''''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Remaining Obligation(s)




The following remains to be proven:


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Remaining Obligation(s)




The following remains to be proven:

Termination of R could not be shown.
Duration:
0:00 minutes