(0) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

bsort(S(x'), Cons(x, xs)) → bsort(x', bubble(x, xs))
len(Cons(x, xs)) → +(S(0), len(xs))
bubble(x', Cons(x, xs)) → bubble[Ite][False][Ite](<(x', x), x', Cons(x, xs))
len(Nil) → 0
bubble(x, Nil) → Cons(x, Nil)
bsort(0, xs) → xs
bubblesort(xs) → bsort(len(xs), xs)

The (relative) TRS S consists of the following rules:

+(x, S(0)) → S(x)
+(S(0), y) → S(y)
<(S(x), S(y)) → <(x, y)
<(0, S(y)) → True
<(x, 0) → False
bubble[Ite][False][Ite](False, x', Cons(x, xs)) → Cons(x, bubble(x', xs))
bubble[Ite][False][Ite](True, x', Cons(x, xs)) → Cons(x', bubble(x, xs))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (UPPER BOUND(ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubblesort(z0) → bsort(len(z0), z0)
Tuples:

+'(z0, S(0)) → c
+'(S(0), z0) → c1
<'(S(z0), S(z1)) → c2(<'(z0, z1))
<'(0, S(z0)) → c3
<'(z0, 0) → c4
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BSORT(0, z0) → c8
LEN(Cons(z0, z1)) → c9(+'(S(0), len(z1)), LEN(z1))
LEN(Nil) → c10
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
BUBBLESORT(z0) → c13(BSORT(len(z0), z0), LEN(z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BSORT(0, z0) → c8
LEN(Cons(z0, z1)) → c9(+'(S(0), len(z1)), LEN(z1))
LEN(Nil) → c10
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
BUBBLESORT(z0) → c13(BSORT(len(z0), z0), LEN(z0))
K tuples:none
Defined Rule Symbols:

bsort, len, bubble, bubblesort, +, <, bubble[Ite][False][Ite]

Defined Pair Symbols:

+', <', BUBBLE[ITE][FALSE][ITE], BSORT, LEN, BUBBLE, BUBBLESORT

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 6 trailing nodes:

<'(z0, 0) → c4
+'(z0, S(0)) → c
<'(0, S(z0)) → c3
+'(S(0), z0) → c1
BSORT(0, z0) → c8
LEN(Nil) → c10

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubblesort(z0) → bsort(len(z0), z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
LEN(Cons(z0, z1)) → c9(+'(S(0), len(z1)), LEN(z1))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
BUBBLESORT(z0) → c13(BSORT(len(z0), z0), LEN(z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
LEN(Cons(z0, z1)) → c9(+'(S(0), len(z1)), LEN(z1))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
BUBBLESORT(z0) → c13(BSORT(len(z0), z0), LEN(z0))
K tuples:none
Defined Rule Symbols:

bsort, len, bubble, bubblesort, +, <, bubble[Ite][False][Ite]

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, LEN, BUBBLE, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c9, c11, c12, c13

(5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubblesort(z0) → bsort(len(z0), z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
BUBBLESORT(z0) → c13(BSORT(len(z0), z0), LEN(z0))
LEN(Cons(z0, z1)) → c9(LEN(z1))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
BUBBLESORT(z0) → c13(BSORT(len(z0), z0), LEN(z0))
LEN(Cons(z0, z1)) → c9(LEN(z1))
K tuples:none
Defined Rule Symbols:

bsort, len, bubble, bubblesort, +, <, bubble[Ite][False][Ite]

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, BUBBLESORT, LEN

Compound Symbols:

c2, c5, c6, c7, c11, c12, c13, c9

(7) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubblesort(z0) → bsort(len(z0), z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
BUBBLESORT(z0) → c(LEN(z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
BUBBLESORT(z0) → c(LEN(z0))
K tuples:none
Defined Rule Symbols:

bsort, len, bubble, bubblesort, +, <, bubble[Ite][False][Ite]

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(9) CdtLeafRemovalProof (ComplexityIfPolyImplication transformation)

Removed 1 leading nodes:

BUBBLESORT(z0) → c(LEN(z0))

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubblesort(z0) → bsort(len(z0), z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
K tuples:none
Defined Rule Symbols:

bsort, len, bubble, bubblesort, +, <, bubble[Ite][False][Ite]

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(11) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

The following tuples could be moved from S to K by knowledge propagation:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubblesort(z0) → bsort(len(z0), z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
K tuples:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))
Defined Rule Symbols:

bsort, len, bubble, bubblesort, +, <, bubble[Ite][False][Ite]

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(13) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

bsort(S(z0), Cons(z1, z2)) → bsort(z0, bubble(z1, z2))
bsort(0, z0) → z0
bubblesort(z0) → bsort(len(z0), z0)

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
K tuples:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))
Defined Rule Symbols:

bubble, bubble[Ite][False][Ite], <, len, +

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LEN(Cons(z0, z1)) → c9(LEN(z1))
We considered the (Usable) Rules:none
And the Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+(x1, x2)) = [2] + [2]x1   
POL(0) = 0   
POL(<(x1, x2)) = 0   
POL(<'(x1, x2)) = 0   
POL(BSORT(x1, x2)) = [3]   
POL(BUBBLE(x1, x2)) = 0   
POL(BUBBLESORT(x1)) = [4] + [5]x1   
POL(BUBBLE[ITE][FALSE][ITE](x1, x2, x3)) = 0   
POL(Cons(x1, x2)) = [1] + x2   
POL(False) = 0   
POL(LEN(x1)) = x1   
POL(Nil) = [2]   
POL(S(x1)) = 0   
POL(True) = 0   
POL(bubble(x1, x2)) = [2]x2   
POL(bubble[Ite][False][Ite](x1, x2, x3)) = [4]x1 + [2]x3   
POL(c(x1)) = x1   
POL(c11(x1, x2)) = x1 + x2   
POL(c12) = 0   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(c9(x1)) = x1   
POL(len(x1)) = [3] + x1   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
K tuples:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))
LEN(Cons(z0, z1)) → c9(LEN(z1))
Defined Rule Symbols:

bubble, bubble[Ite][False][Ite], <, len, +

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(17) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
We considered the (Usable) Rules:

len(Nil) → 0
len(Cons(z0, z1)) → +(S(0), len(z1))
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
And the Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+(x1, x2)) = x1 + x2   
POL(0) = [1]   
POL(<(x1, x2)) = [4]   
POL(<'(x1, x2)) = 0   
POL(BSORT(x1, x2)) = [1] + x1   
POL(BUBBLE(x1, x2)) = 0   
POL(BUBBLESORT(x1)) = [4] + [5]x1   
POL(BUBBLE[ITE][FALSE][ITE](x1, x2, x3)) = 0   
POL(Cons(x1, x2)) = [3] + x2   
POL(False) = [3]   
POL(LEN(x1)) = x1   
POL(Nil) = 0   
POL(S(x1)) = [1] + x1   
POL(True) = [3]   
POL(bubble(x1, x2)) = [2]x1   
POL(bubble[Ite][False][Ite](x1, x2, x3)) = [2] + [5]x2 + [4]x3   
POL(c(x1)) = x1   
POL(c11(x1, x2)) = x1 + x2   
POL(c12) = 0   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(c9(x1)) = x1   
POL(len(x1)) = [2] + [5]x1   

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:

BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
K tuples:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))
LEN(Cons(z0, z1)) → c9(LEN(z1))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
Defined Rule Symbols:

bubble, bubble[Ite][False][Ite], <, len, +

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(19) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

BUBBLE(z0, Nil) → c12
We considered the (Usable) Rules:

len(Nil) → 0
len(Cons(z0, z1)) → +(S(0), len(z1))
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
And the Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+(x1, x2)) = [4]x1 + x2   
POL(0) = 0   
POL(<(x1, x2)) = [2]x1 + [2]x2   
POL(<'(x1, x2)) = 0   
POL(BSORT(x1, x2)) = x1   
POL(BUBBLE(x1, x2)) = [1]   
POL(BUBBLESORT(x1)) = [2]x1   
POL(BUBBLE[ITE][FALSE][ITE](x1, x2, x3)) = [1]   
POL(Cons(x1, x2)) = [4] + x2   
POL(False) = 0   
POL(LEN(x1)) = [4]x1   
POL(Nil) = 0   
POL(S(x1)) = [2] + x1   
POL(True) = [4]   
POL(bubble(x1, x2)) = x1   
POL(bubble[Ite][False][Ite](x1, x2, x3)) = [2] + [5]x2   
POL(c(x1)) = x1   
POL(c11(x1, x2)) = x1 + x2   
POL(c12) = 0   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(c9(x1)) = x1   
POL(len(x1)) = [2]x1   

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:

BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
K tuples:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))
LEN(Cons(z0, z1)) → c9(LEN(z1))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Nil) → c12
Defined Rule Symbols:

bubble, bubble[Ite][False][Ite], <, len, +

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(21) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
We considered the (Usable) Rules:

bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
len(Nil) → 0
bubble(z0, Nil) → Cons(z0, Nil)
len(Cons(z0, z1)) → +(S(0), len(z1))
bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
And the Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+(x1, x2)) = x1 + x2   
POL(0) = 0   
POL(<(x1, x2)) = 0   
POL(<'(x1, x2)) = 0   
POL(BSORT(x1, x2)) = x1·x2   
POL(BUBBLE(x1, x2)) = [1] + x2   
POL(BUBBLESORT(x1)) = [1] + [2]x12   
POL(BUBBLE[ITE][FALSE][ITE](x1, x2, x3)) = x3   
POL(Cons(x1, x2)) = [2] + x2   
POL(False) = 0   
POL(LEN(x1)) = 0   
POL(Nil) = 0   
POL(S(x1)) = [1] + x1   
POL(True) = 0   
POL(bubble(x1, x2)) = [2] + x2   
POL(bubble[Ite][False][Ite](x1, x2, x3)) = [2] + x3   
POL(c(x1)) = x1   
POL(c11(x1, x2)) = x1 + x2   
POL(c12) = 0   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c6(x1)) = x1   
POL(c7(x1, x2)) = x1 + x2   
POL(c9(x1)) = x1   
POL(len(x1)) = [2]x1   

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

bubble(z0, Cons(z1, z2)) → bubble[Ite][False][Ite](<(z0, z1), z0, Cons(z1, z2))
bubble(z0, Nil) → Cons(z0, Nil)
bubble[Ite][False][Ite](False, z0, Cons(z1, z2)) → Cons(z1, bubble(z0, z2))
bubble[Ite][False][Ite](True, z0, Cons(z1, z2)) → Cons(z0, bubble(z1, z2))
<(S(z0), S(z1)) → <(z0, z1)
<(0, S(z0)) → True
<(z0, 0) → False
len(Cons(z0, z1)) → +(S(0), len(z1))
len(Nil) → 0
+(z0, S(0)) → S(z0)
+(S(0), z0) → S(z0)
Tuples:

<'(S(z0), S(z1)) → c2(<'(z0, z1))
BUBBLE[ITE][FALSE][ITE](False, z0, Cons(z1, z2)) → c5(BUBBLE(z0, z2))
BUBBLE[ITE][FALSE][ITE](True, z0, Cons(z1, z2)) → c6(BUBBLE(z1, z2))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
BUBBLE(z0, Nil) → c12
LEN(Cons(z0, z1)) → c9(LEN(z1))
BUBBLESORT(z0) → c(BSORT(len(z0), z0))
S tuples:none
K tuples:

BUBBLESORT(z0) → c(BSORT(len(z0), z0))
LEN(Cons(z0, z1)) → c9(LEN(z1))
BSORT(S(z0), Cons(z1, z2)) → c7(BSORT(z0, bubble(z1, z2)), BUBBLE(z1, z2))
BUBBLE(z0, Nil) → c12
BUBBLE(z0, Cons(z1, z2)) → c11(BUBBLE[ITE][FALSE][ITE](<(z0, z1), z0, Cons(z1, z2)), <'(z0, z1))
Defined Rule Symbols:

bubble, bubble[Ite][False][Ite], <, len, +

Defined Pair Symbols:

<', BUBBLE[ITE][FALSE][ITE], BSORT, BUBBLE, LEN, BUBBLESORT

Compound Symbols:

c2, c5, c6, c7, c11, c12, c9, c

(23) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(24) BOUNDS(1, 1)