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

Innermost 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
Forward Instantiation Transformation
       →DP Problem 2
Nar


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


Strategy:

innermost




On this DP problem, a Forward 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))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




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

SUM(cons(0, x), y) -> SUM(x, y)
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 4
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




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

SUM(cons(s(s(n'')), x''), cons(m'', y'')) -> SUM(cons(s(n''), x''), cons(s(m''), y''))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 5
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




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

SUM(cons(s(0), x''), cons(m', y'')) -> SUM(cons(0, x''), cons(s(m'), y''))
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 6
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




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

SUM(cons(0, cons(0, x'')), y'') -> SUM(cons(0, x''), y'')
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 7
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




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

SUM(cons(0, cons(s(s(n'''')), x'''')), cons(m'''', y'''')) -> SUM(cons(s(s(n'''')), x''''), cons(m'''', y''''))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 8
Forward Instantiation Transformation
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




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

SUM(cons(0, cons(s(0), x'''')), cons(m''', y'''')) -> SUM(cons(s(0), x''''), cons(m''', y''''))
three new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 9
Polynomial Ordering
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 10
Dependency Graph
       →DP Problem 2
Nar


Dependency Pairs:

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


Strategy:

innermost




Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 11
Polynomial Ordering
       →DP Problem 2
Nar


Dependency Pair:

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


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the implicit AFS that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
           →DP Problem 3
FwdInst
             ...
               →DP Problem 12
Dependency Graph
       →DP Problem 2
Nar


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Narrowing Transformation


Dependency Pair:

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


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


Strategy:

innermost




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

WEIGHT(cons(n, cons(m, x))) -> WEIGHT(sum(cons(n, cons(m, x)), cons(0, x)))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 13
Narrowing Transformation


Dependency Pairs:

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


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


Strategy:

innermost




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

WEIGHT(cons(s(n''), cons(m'', x''))) -> WEIGHT(sum(cons(n'', cons(m'', x'')), cons(s(0), x'')))
two new Dependency Pairs are created:

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

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 14
Narrowing Transformation


Dependency Pairs:

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


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


Strategy:

innermost




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

WEIGHT(cons(0, cons(m', x''))) -> WEIGHT(sum(cons(m', x''), cons(0, x'')))
two new Dependency Pairs are created:

WEIGHT(cons(0, cons(s(n'), x'''))) -> WEIGHT(sum(cons(n', x'''), cons(s(0), x''')))
WEIGHT(cons(0, cons(0, x'''))) -> WEIGHT(sum(x''', cons(0, x''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 15
Polynomial Ordering


Dependency Pairs:

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


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

WEIGHT(cons(0, cons(s(n'), x'''))) -> WEIGHT(sum(cons(n', x'''), cons(s(0), x''')))


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS 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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  1  
  POL(cons(x1, x2))=  x1  
  POL(WEIGHT(x1))=  x1  
  POL(nil)=  1  
  POL(sum(x1, x2))=  x2  
  POL(s(x1))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 16
Polynomial Ordering


Dependency Pairs:

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


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

WEIGHT(cons(0, cons(0, x'''))) -> WEIGHT(sum(x''', cons(0, x''')))


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS 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


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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 17
Polynomial Ordering


Dependency Pairs:

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


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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


Additionally, the following usable rules for innermost w.r.t. to the implicit AFS 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


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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
Nar
           →DP Problem 13
Nar
             ...
               →DP Problem 18
Dependency Graph


Dependency Pair:


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:02 minutes