R
↳Dependency Pair Analysis
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)
R
↳DPs
→DP Problem 1
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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)
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
two new Dependency Pairs are created:
INSERT(x, cons(v, w)) -> CHOOSE(x, cons(v, w), x, v)
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''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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)
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
two new Dependency Pairs are created:
CHOOSE(x, cons(v, w), 0, s(z)) -> INSERT(x, w)
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''''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 4
↳Instantiation Transformation
→DP Problem 2
↳FwdInst
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''''))
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
one new Dependency Pair is created:
CHOOSE(0, cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(0, cons(s(z''''), w''''))
CHOOSE(0, cons(s(z'), cons(s(z'''''), w''''')), 0, s(z')) -> INSERT(0, cons(s(z'''''), w'''''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 6
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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''))
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
one new Dependency Pair is created:
INSERT(0, cons(s(z''), w'')) -> CHOOSE(0, cons(s(z''), w''), 0, s(z''))
INSERT(0, cons(s(z''''), cons(s(z'''''''), w'''''''))) -> CHOOSE(0, cons(s(z''''), cons(s(z'''''''), w''''''')), 0, s(z''''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 8
↳Argument Filtering and Ordering
→DP Problem 2
↳FwdInst
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'''''))
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
INSERT(0, cons(s(z''''), cons(s(z'''''''), w'''''''))) -> CHOOSE(0, cons(s(z''''), cons(s(z'''''''), w''''''')), 0, s(z''''))
POL(CHOOSE(x1, x2, x3, x4)) = x1 + x2 + x3 + x4 POL(0) = 0 POL(cons(x1, x2)) = 1 + x1 + x2 POL(INSERT(x1, x2)) = 1 + x1 + x2 POL(s) = 0
INSERT(x1, x2) -> INSERT(x1, x2)
CHOOSE(x1, x2, x3, x4) -> CHOOSE(x1, x2, x3, x4)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 14
↳Dependency Graph
→DP Problem 2
↳FwdInst
CHOOSE(0, cons(s(z'), cons(s(z'''''), w''''')), 0, s(z')) -> INSERT(0, cons(s(z'''''), w'''''))
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 5
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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''))
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
two new Dependency Pairs are created:
CHOOSE(x, cons(v, w), s(y), s(z)) -> CHOOSE(x, cons(v, w), y, z)
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''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 7
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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''''))
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
two new Dependency Pairs are created:
INSERT(s(y''), cons(s(z''), w'')) -> CHOOSE(s(y''), cons(s(z''), 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'''')))
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'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 9
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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''))
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
two new Dependency Pairs are created:
CHOOSE(s(y''''), cons(v, cons(s(z''''), w'''')), 0, s(z)) -> INSERT(s(y''''), cons(s(z''''), w''''))
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'''''''''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 10
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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'''')))
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
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(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'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 11
↳Forward Instantiation Transformation
→DP Problem 2
↳FwdInst
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'''''''''')))
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
two new Dependency Pairs are created:
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(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'''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 12
↳Argument Filtering and Ordering
→DP Problem 2
↳FwdInst
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'''))
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
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'''''''''')))
POL(CHOOSE(x1, x2, x3, x4)) = x1 + x2 + x3 + x4 POL(0) = 0 POL(cons(x1, x2)) = 1 + x1 + x2 POL(INSERT(x1, x2)) = x1 + x2 POL(s) = 0
CHOOSE(x1, x2, x3, x4) -> CHOOSE(x1, x2, x3, x4)
s(x1) -> s
cons(x1, x2) -> cons(x1, x2)
INSERT(x1, x2) -> INSERT(x1, x2)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 15
↳Dependency Graph
→DP Problem 2
↳FwdInst
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'''))
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 13
↳Argument Filtering and Ordering
→DP Problem 2
↳FwdInst
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'''')))
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
INSERT(s(s(y'''')), cons(s(s(z'''')), w'''')) -> CHOOSE(s(s(y'''')), cons(s(s(z'''')), w''''), s(s(y'''')), s(s(z'''')))
POL(CHOOSE(x1, x2, x3, x4)) = x1 + x2 + x3 + x4 POL(0) = 0 POL(cons(x1, x2)) = 1 + x1 + x2 POL(INSERT(x1, x2)) = 1 + x1 + x2 POL(s) = 0
CHOOSE(x1, x2, x3, x4) -> CHOOSE(x1, x2, x3, x4)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s
INSERT(x1, x2) -> INSERT(x1, x2)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 16
↳Dependency Graph
→DP Problem 2
↳FwdInst
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(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'''')))
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 17
↳Argument Filtering and Ordering
→DP Problem 2
↳FwdInst
CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(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
CHOOSE(x'''', cons(v'''', w''''), s(s(s(y''''))), s(s(s(z'''')))) -> CHOOSE(x'''', cons(v'''', w''''), s(s(y'''')), s(s(z'''')))
POL(CHOOSE(x1, x2, x3, x4)) = 1 + x1 + x2 + x3 + x4 POL(cons(x1, x2)) = 1 + x1 + x2 POL(s(x1)) = 1 + x1
CHOOSE(x1, x2, x3, x4) -> CHOOSE(x1, x2, x3, x4)
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 3
↳FwdInst
...
→DP Problem 18
↳Dependency Graph
→DP Problem 2
↳FwdInst
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
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳Forward Instantiation Transformation
SORT(cons(x, y)) -> SORT(y)
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
one new Dependency Pair is created:
SORT(cons(x, y)) -> SORT(y)
SORT(cons(x, cons(x'', y''))) -> SORT(cons(x'', y''))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 19
↳Forward Instantiation Transformation
SORT(cons(x, cons(x'', y''))) -> SORT(cons(x'', y''))
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
one new Dependency Pair is created:
SORT(cons(x, cons(x'', y''))) -> SORT(cons(x'', y''))
SORT(cons(x, cons(x'''', cons(x''''', y'''')))) -> SORT(cons(x'''', cons(x''''', y'''')))
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 19
↳FwdInst
...
→DP Problem 20
↳Argument Filtering and Ordering
SORT(cons(x, cons(x'''', cons(x''''', y'''')))) -> SORT(cons(x'''', cons(x''''', y'''')))
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
SORT(cons(x, cons(x'''', cons(x''''', y'''')))) -> SORT(cons(x'''', cons(x''''', y'''')))
POL(cons(x1, x2)) = 1 + x1 + x2 POL(SORT(x1)) = 1 + x1
SORT(x1) -> SORT(x1)
cons(x1, x2) -> cons(x1, x2)
R
↳DPs
→DP Problem 1
↳FwdInst
→DP Problem 2
↳FwdInst
→DP Problem 19
↳FwdInst
...
→DP Problem 21
↳Dependency Graph
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