Term Rewriting System R:
[x, y, z]
bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

BSORT(.(x, y)) -> LAST(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
BSORT(.(x, y)) -> BUBBLE(.(x, y))
BSORT(.(x, y)) -> BSORT(butlast(bubble(.(x, y))))
BSORT(.(x, y)) -> BUTLAST(bubble(.(x, y)))
BUBBLE(.(x, .(y, z))) -> BUBBLE(.(x, z))
BUBBLE(.(x, .(y, z))) -> BUBBLE(.(y, z))
LAST(.(x, .(y, z))) -> LAST(.(y, z))
BUTLAST(.(x, .(y, z))) -> BUTLAST(.(y, z))

Furthermore, R contains four SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Remaining


Dependency Pair:

LAST(.(x, .(y, z))) -> LAST(.(y, z))


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

LAST(.(x, .(y, z))) -> LAST(.(y, z))


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

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(LAST(x1))=  1 + x1  
  POL(.(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 5
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Remaining


Dependency Pair:


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Remaining


Dependency Pairs:

BUBBLE(.(x, .(y, z))) -> BUBBLE(.(y, z))
BUBBLE(.(x, .(y, z))) -> BUBBLE(.(x, z))


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost




The following dependency pairs can be strictly oriented:

BUBBLE(.(x, .(y, z))) -> BUBBLE(.(y, z))
BUBBLE(.(x, .(y, z))) -> BUBBLE(.(x, z))


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

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(BUBBLE(x1))=  1 + x1  
  POL(.(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 6
Dependency Graph
       →DP Problem 3
Polo
       →DP Problem 4
Remaining


Dependency Pair:


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polynomial Ordering
       →DP Problem 4
Remaining


Dependency Pair:

BUTLAST(.(x, .(y, z))) -> BUTLAST(.(y, z))


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost




The following dependency pair can be strictly oriented:

BUTLAST(.(x, .(y, z))) -> BUTLAST(.(y, z))


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

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(BUTLAST(x1))=  1 + x1  
  POL(.(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 7
Dependency Graph
       →DP Problem 4
Remaining


Dependency Pair:


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Remaining Obligation(s)




The following remains to be proven:
Dependency Pair:

BSORT(.(x, y)) -> BSORT(butlast(bubble(.(x, y))))


Rules:


bsort(nil) -> nil
bsort(.(x, y)) -> last(.(bubble(.(x, y)), bsort(butlast(bubble(.(x, y))))))
bubble(nil) -> nil
bubble(.(x, nil)) -> .(x, nil)
bubble(.(x, .(y, z))) -> if(<=(x, y), .(y, bubble(.(x, z))), .(x, bubble(.(y, z))))
last(nil) -> 0
last(.(x, nil)) -> x
last(.(x, .(y, z))) -> last(.(y, z))
butlast(nil) -> nil
butlast(.(x, nil)) -> nil
butlast(.(x, .(y, z))) -> .(x, butlast(.(y, z)))


Strategy:

innermost



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