Term Rewriting System R:
[x, y, v, w, z]
sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

SORT(cons(x, y)) -> INSERT(x, sort(y))
SORT(cons(x, y)) -> SORT(y)
INSERT(x, cons(v, w)) -> CHOOSE(x, cons(v, w), x, v)
CHOOSE(x, cons(v, w), 0, s(z)) -> INSERT(x, w)
CHOOSE(x, cons(v, w), s(y), s(z)) -> CHOOSE(x, cons(v, w), y, z)

Furthermore, R contains two SCCs.


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


Dependency Pairs:

CHOOSE(x, cons(v, w), s(y), s(z)) -> CHOOSE(x, cons(v, w), y, z)
CHOOSE(x, cons(v, w), 0, s(z)) -> INSERT(x, w)
INSERT(x, cons(v, w)) -> CHOOSE(x, cons(v, w), x, v)


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

INSERT(x, cons(v, w)) -> CHOOSE(x, cons(v, w), x, v)
two new Dependency Pairs are created:

INSERT(0, cons(s(z''), w'')) -> CHOOSE(0, cons(s(z''), w''), 0, s(z''))
INSERT(s(y''), cons(s(z''), w'')) -> CHOOSE(s(y''), cons(s(z''), w''), s(y''), s(z''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

INSERT(s(y''), cons(s(z''), w'')) -> CHOOSE(s(y''), cons(s(z''), w''), s(y''), s(z''))
INSERT(0, cons(s(z''), w'')) -> CHOOSE(0, cons(s(z''), w''), 0, s(z''))
CHOOSE(x, cons(v, w), 0, s(z)) -> INSERT(x, w)
CHOOSE(x, cons(v, w), s(y), s(z)) -> CHOOSE(x, cons(v, w), y, z)


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

CHOOSE(x, cons(v, w), 0, s(z)) -> INSERT(x, w)
two new Dependency Pairs are created:

CHOOSE(0, cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(0, cons(s(z''''), w''''))
CHOOSE(s(y''''), cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(s(y''''), cons(s(z''''), w''''))

The transformation is resulting in two new DP problems:



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


Dependency Pairs:

INSERT(0, cons(s(z''), w'')) -> CHOOSE(0, cons(s(z''), w''), 0, s(z''))
CHOOSE(0, cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(0, cons(s(z''''), w''''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

CHOOSE(0, cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(0, cons(s(z''''), w''''))
one new Dependency Pair is created:

CHOOSE(0, cons(s(z'), cons(s(z'''''), w''''')), 0, s(z')) -> INSERT(0, cons(s(z'''''), w'''''))

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
FwdInst


Dependency Pairs:

CHOOSE(0, cons(s(z'), cons(s(z'''''), w''''')), 0, s(z')) -> INSERT(0, cons(s(z'''''), w'''''))
INSERT(0, cons(s(z''), w'')) -> CHOOSE(0, cons(s(z''), w''), 0, s(z''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

INSERT(0, cons(s(z''), w'')) -> CHOOSE(0, cons(s(z''), w''), 0, s(z''))
one new Dependency Pair is created:

INSERT(0, cons(s(z''''), cons(s(z'''''''), w'''''''))) -> CHOOSE(0, cons(s(z''''), cons(s(z'''''''), w''''''')), 0, s(z''''))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

INSERT(0, cons(s(z''''), cons(s(z'''''''), w'''''''))) -> CHOOSE(0, cons(s(z''''), cons(s(z'''''''), w''''''')), 0, s(z''''))
CHOOSE(0, cons(s(z'), cons(s(z'''''), w''''')), 0, s(z')) -> INSERT(0, cons(s(z'''''), w'''''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




The following dependency pair can be strictly oriented:

CHOOSE(0, cons(s(z'), cons(s(z'''''), w''''')), 0, s(z')) -> INSERT(0, cons(s(z'''''), w'''''))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(CHOOSE(x1, x2, x3, x4))=  x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  x1 + x2  
  POL(INSERT(x1, x2))=  x2  
  POL(s(x1))=  1  

resulting in one new DP problem.



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


Dependency Pair:

INSERT(0, cons(s(z''''), cons(s(z'''''''), w'''''''))) -> CHOOSE(0, cons(s(z''''), cons(s(z'''''''), w''''''')), 0, s(z''''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pairs:

CHOOSE(s(y''''), cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(s(y''''), cons(s(z''''), w''''))
CHOOSE(x, cons(v, w), s(y), s(z)) -> CHOOSE(x, cons(v, w), y, z)
INSERT(s(y''), cons(s(z''), w'')) -> CHOOSE(s(y''), cons(s(z''), w''), s(y''), s(z''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

CHOOSE(x, cons(v, w), s(y), s(z)) -> CHOOSE(x, cons(v, w), y, z)
two new Dependency Pairs are created:

CHOOSE(x'', cons(v'', w''), s(s(y'')), s(s(z''))) -> CHOOSE(x'', cons(v'', w''), s(y''), s(z''))
CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), s(0), s(s(z''))) -> CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), 0, s(z''))

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
FwdInst


Dependency Pairs:

CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), s(0), s(s(z''))) -> CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), 0, s(z''))
CHOOSE(x'', cons(v'', w''), s(s(y'')), s(s(z''))) -> CHOOSE(x'', cons(v'', w''), s(y''), s(z''))
INSERT(s(y''), cons(s(z''), w'')) -> CHOOSE(s(y''), cons(s(z''), w''), s(y''), s(z''))
CHOOSE(s(y''''), cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(s(y''''), cons(s(z''''), w''''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

INSERT(s(y''), cons(s(z''), w'')) -> CHOOSE(s(y''), cons(s(z''), w''), s(y''), s(z''))
two new Dependency Pairs are created:

INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
INSERT(s(0), cons(s(s(z'''')), cons(s(z''''''''), w''''''''))) -> CHOOSE(s(0), cons(s(s(z'''')), cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

INSERT(s(0), cons(s(s(z'''')), cons(s(z''''''''), w''''''''))) -> CHOOSE(s(0), cons(s(s(z'''')), cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))
CHOOSE(x'', cons(v'', w''), s(s(y'')), s(s(z''))) -> CHOOSE(x'', cons(v'', w''), s(y''), s(z''))
INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
CHOOSE(s(y''''), cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(s(y''''), cons(s(z''''), w''''))
CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), s(0), s(s(z''))) -> CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), 0, s(z''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

CHOOSE(s(y''''), cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(s(y''''), cons(s(z''''), w''''))
two new Dependency Pairs are created:

CHOOSE(s(s(y'''''')), cons(v, cons(s(s(z'''''')), w'''''')), 0, s(z)) -> INSERT(s(s(y'''''')), cons(s(s(z'''''')), w''''''))
CHOOSE(s(0), cons(v, cons(s(s(z'''''')), cons(s(z''''''''''), w''''''''''))), 0, s(z)) -> INSERT(s(0), cons(s(s(z'''''')), cons(s(z''''''''''), w'''''''''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

CHOOSE(s(0), cons(v, cons(s(s(z'''''')), cons(s(z''''''''''), w''''''''''))), 0, s(z)) -> INSERT(s(0), cons(s(s(z'''''')), cons(s(z''''''''''), w'''''''''')))
CHOOSE(x'', cons(v'', w''), s(s(y'')), s(s(z''))) -> CHOOSE(x'', cons(v'', w''), s(y''), s(z''))
INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
CHOOSE(s(s(y'''''')), cons(v, cons(s(s(z'''''')), w'''''')), 0, s(z)) -> INSERT(s(s(y'''''')), cons(s(s(z'''''')), w''''''))
CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), s(0), s(s(z''))) -> CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), 0, s(z''))
INSERT(s(0), cons(s(s(z'''')), cons(s(z''''''''), w''''''''))) -> CHOOSE(s(0), cons(s(s(z'''')), cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

CHOOSE(x'', cons(v'', w''), s(s(y'')), s(s(z''))) -> CHOOSE(x'', cons(v'', w''), s(y''), s(z''))
two new Dependency Pairs are created:

CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))
CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(s(0)), s(s(s(z'''')))) -> CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))

The transformation is resulting in one new DP problem:



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


Dependency Pairs:

CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(s(0)), s(s(s(z'''')))) -> CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))
CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))
INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
CHOOSE(s(s(y'''''')), cons(v, cons(s(s(z'''''')), w'''''')), 0, s(z)) -> INSERT(s(s(y'''''')), cons(s(s(z'''''')), w''''''))
CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), s(0), s(s(z''))) -> CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), 0, s(z''))
INSERT(s(0), cons(s(s(z'''')), cons(s(z''''''''), w''''''''))) -> CHOOSE(s(0), cons(s(s(z'''')), cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))
CHOOSE(s(0), cons(v, cons(s(s(z'''''')), cons(s(z''''''''''), w''''''''''))), 0, s(z)) -> INSERT(s(0), cons(s(s(z'''''')), cons(s(z''''''''''), w'''''''''')))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), s(0), s(s(z''))) -> CHOOSE(s(y''''''), cons(v'', cons(s(z''''''), w'''''')), 0, s(z''))
two new Dependency Pairs are created:

CHOOSE(s(s(y'''''''')), cons(v''', cons(s(s(z'''''''')), w'''''''')), s(0), s(s(z'''))) -> CHOOSE(s(s(y'''''''')), cons(v''', cons(s(s(z'''''''')), w'''''''')), 0, s(z'''))
CHOOSE(s(0), cons(v''', cons(s(s(z'''''''')), cons(s(z''''''''''''), w''''''''''''))), s(0), s(s(z'''))) -> CHOOSE(s(0), cons(v''', cons(s(s(z'''''''')), cons(s(z''''''''''''), w''''''''''''))), 0, s(z'''))

The transformation is resulting in two new DP problems:



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


Dependency Pairs:

INSERT(s(0), cons(s(s(z'''')), cons(s(z''''''''), w''''''''))) -> CHOOSE(s(0), cons(s(s(z'''')), cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))
CHOOSE(s(0), cons(v, cons(s(s(z'''''')), cons(s(z''''''''''), w''''''''''))), 0, s(z)) -> INSERT(s(0), cons(s(s(z'''''')), cons(s(z''''''''''), w'''''''''')))
CHOOSE(s(0), cons(v''', cons(s(s(z'''''''')), cons(s(z''''''''''''), w''''''''''''))), s(0), s(s(z'''))) -> CHOOSE(s(0), cons(v''', cons(s(s(z'''''''')), cons(s(z''''''''''''), w''''''''''''))), 0, s(z'''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




The following dependency pair can be strictly oriented:

CHOOSE(s(0), cons(v, cons(s(s(z'''''')), cons(s(z''''''''''), w''''''''''))), 0, s(z)) -> INSERT(s(0), cons(s(s(z'''''')), cons(s(z''''''''''), w'''''''''')))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(CHOOSE(x1, x2, x3, x4))=  x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  1 + x2  
  POL(INSERT(x1, x2))=  x2  
  POL(s(x1))=  0  

resulting in one new DP problem.



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


Dependency Pairs:

INSERT(s(0), cons(s(s(z'''')), cons(s(z''''''''), w''''''''))) -> CHOOSE(s(0), cons(s(s(z'''')), cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))
CHOOSE(s(0), cons(v''', cons(s(s(z'''''''')), cons(s(z''''''''''''), w''''''''''''))), s(0), s(s(z'''))) -> CHOOSE(s(0), cons(v''', cons(s(s(z'''''''')), cons(s(z''''''''''''), w''''''''''''))), 0, s(z'''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pairs:

CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))
INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
CHOOSE(s(s(y'''''')), cons(v, cons(s(s(z'''''')), w'''''')), 0, s(z)) -> INSERT(s(s(y'''''')), cons(s(s(z'''''')), w''''''))
CHOOSE(s(s(y'''''''')), cons(v''', cons(s(s(z'''''''')), w'''''''')), s(0), s(s(z'''))) -> CHOOSE(s(s(y'''''''')), cons(v''', cons(s(s(z'''''''')), w'''''''')), 0, s(z'''))
CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(s(0)), s(s(s(z'''')))) -> CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




The following dependency pair can be strictly oriented:

CHOOSE(s(s(y'''''')), cons(v, cons(s(s(z'''''')), w'''''')), 0, s(z)) -> INSERT(s(s(y'''''')), cons(s(s(z'''''')), w''''''))


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(CHOOSE(x1, x2, x3, x4))=  x2  
  POL(0)=  0  
  POL(cons(x1, x2))=  1 + x2  
  POL(INSERT(x1, x2))=  x2  
  POL(s(x1))=  0  

resulting in one new DP problem.



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


Dependency Pairs:

CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))
INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
CHOOSE(s(s(y'''''''')), cons(v''', cons(s(s(z'''''''')), w'''''''')), s(0), s(s(z'''))) -> CHOOSE(s(s(y'''''''')), cons(v''', cons(s(s(z'''''''')), w'''''''')), 0, s(z'''))
CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(s(0)), s(s(s(z'''')))) -> CHOOSE(s(y''''''''), cons(v'''', cons(s(z''''''''), w'''''''')), s(0), s(s(z'''')))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


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 17
Polynomial Ordering
       →DP Problem 2
FwdInst


Dependency Pair:

CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




The following dependency pair can be strictly oriented:

CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))


There are no usable rules for innermost that need to be oriented.

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

resulting in one new DP problem.



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


Dependency Pair:


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


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


Dependency Pair:

SORT(cons(x, y)) -> SORT(y)


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

SORT(cons(x, y)) -> SORT(y)
one new Dependency Pair is created:

SORT(cons(x, cons(x'', y''))) -> SORT(cons(x'', y''))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 19
Forward Instantiation Transformation


Dependency Pair:

SORT(cons(x, cons(x'', y''))) -> SORT(cons(x'', y''))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




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

SORT(cons(x, cons(x'', y''))) -> SORT(cons(x'', y''))
one new Dependency Pair is created:

SORT(cons(x, cons(x'''', cons(x''''', y'''')))) -> SORT(cons(x'''', cons(x''''', y'''')))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 19
FwdInst
             ...
               →DP Problem 20
Polynomial Ordering


Dependency Pair:

SORT(cons(x, cons(x'''', cons(x''''', y'''')))) -> SORT(cons(x'''', cons(x''''', y'''')))


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




The following dependency pair can be strictly oriented:

SORT(cons(x, cons(x'''', cons(x''''', y'''')))) -> SORT(cons(x'''', cons(x''''', y'''')))


There are no usable rules for innermost that need to be oriented.

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

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
FwdInst
       →DP Problem 2
FwdInst
           →DP Problem 19
FwdInst
             ...
               →DP Problem 21
Dependency Graph


Dependency Pair:


Rules:


sort(nil) -> nil
sort(cons(x, y)) -> insert(x, sort(y))
insert(x, nil) -> cons(x, nil)
insert(x, cons(v, w)) -> choose(x, cons(v, w), x, v)
choose(x, cons(v, w), y, 0) -> cons(x, cons(v, w))
choose(x, cons(v, w), 0, s(z)) -> cons(v, insert(x, w))
choose(x, cons(v, w), s(y), s(z)) -> choose(x, cons(v, w), y, z)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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