(0) Obligation:

The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y)
#greater(@x, @y) → #ckgt(#compare(@x, @y))
append(@l, @ys) → append#1(@l, @ys)
append#1(::(@x, @xs), @ys) → ::(@x, append(@xs, @ys))
append#1(nil, @ys) → @ys
insert(@x, @l) → insert#1(@x, @l, @x)
insert#1(tuple#2(@valX, @keyX), @l, @x) → insert#2(@l, @keyX, @valX, @x)
insert#2(::(@l1, @ls), @keyX, @valX, @x) → insert#3(@l1, @keyX, @ls, @valX, @x)
insert#2(nil, @keyX, @valX, @x) → ::(tuple#2(::(@valX, nil), @keyX), nil)
insert#3(tuple#2(@vals1, @key1), @keyX, @ls, @valX, @x) → insert#4(#equal(@key1, @keyX), @key1, @ls, @valX, @vals1, @x)
insert#4(#false, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(@vals1, @key1), insert(@x, @ls))
insert#4(#true, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(::(@valX, @vals1), @key1), @ls)
quicksort(@l) → quicksort#1(@l)
quicksort#1(::(@z, @zs)) → quicksort#2(splitqs(@z, @zs), @z)
quicksort#1(nil) → nil
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys)))
sortAll(@l) → sortAll#1(@l)
sortAll#1(::(@x, @xs)) → sortAll#2(@x, @xs)
sortAll#1(nil) → nil
sortAll#2(tuple#2(@vals, @key), @xs) → ::(tuple#2(quicksort(@vals), @key), sortAll(@xs))
split(@l) → split#1(@l)
split#1(::(@x, @xs)) → insert(@x, split(@xs))
split#1(nil) → nil
splitAndSort(@l) → sortAll(split(@l))
splitqs(@pivot, @l) → splitqs#1(@l, @pivot)
splitqs#1(::(@x, @xs), @pivot) → splitqs#2(splitqs(@pivot, @xs), @pivot, @x)
splitqs#1(nil, @pivot) → tuple#2(nil, nil)
splitqs#2(tuple#2(@ls, @rs), @pivot, @x) → splitqs#3(#greater(@x, @pivot), @ls, @rs, @x)
splitqs#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs)
splitqs#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs))

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

#and(#false, #false) → #false
#and(#false, #true) → #false
#and(#true, #false) → #false
#and(#true, #true) → #true
#ckgt(#EQ) → #false
#ckgt(#GT) → #true
#ckgt(#LT) → #false
#compare(#0, #0) → #EQ
#compare(#0, #neg(@y)) → #GT
#compare(#0, #pos(@y)) → #LT
#compare(#0, #s(@y)) → #LT
#compare(#neg(@x), #0) → #LT
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x)
#compare(#neg(@x), #pos(@y)) → #LT
#compare(#pos(@x), #0) → #GT
#compare(#pos(@x), #neg(@y)) → #GT
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y)
#compare(#s(@x), #0) → #GT
#compare(#s(@x), #s(@y)) → #compare(@x, @y)
#eq(#0, #0) → #true
#eq(#0, #neg(@y)) → #false
#eq(#0, #pos(@y)) → #false
#eq(#0, #s(@y)) → #false
#eq(#neg(@x), #0) → #false
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y)
#eq(#neg(@x), #pos(@y)) → #false
#eq(#pos(@x), #0) → #false
#eq(#pos(@x), #neg(@y)) → #false
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y)
#eq(#s(@x), #0) → #false
#eq(#s(@x), #s(@y)) → #eq(@x, @y)
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))
#eq(::(@x_1, @x_2), nil) → #false
#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #false
#eq(nil, ::(@y_1, @y_2)) → #false
#eq(nil, nil) → #true
#eq(nil, tuple#2(@y_1, @y_2)) → #false
#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) → #false
#eq(tuple#2(@x_1, @x_2), nil) → #false
#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2))

Rewrite Strategy: INNERMOST

(1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID) transformation)

Transformed relative TRS to weighted TRS

(2) Obligation:

The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3).


The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
append(@l, @ys) → append#1(@l, @ys) [1]
append#1(::(@x, @xs), @ys) → ::(@x, append(@xs, @ys)) [1]
append#1(nil, @ys) → @ys [1]
insert(@x, @l) → insert#1(@x, @l, @x) [1]
insert#1(tuple#2(@valX, @keyX), @l, @x) → insert#2(@l, @keyX, @valX, @x) [1]
insert#2(::(@l1, @ls), @keyX, @valX, @x) → insert#3(@l1, @keyX, @ls, @valX, @x) [1]
insert#2(nil, @keyX, @valX, @x) → ::(tuple#2(::(@valX, nil), @keyX), nil) [1]
insert#3(tuple#2(@vals1, @key1), @keyX, @ls, @valX, @x) → insert#4(#equal(@key1, @keyX), @key1, @ls, @valX, @vals1, @x) [1]
insert#4(#false, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(@vals1, @key1), insert(@x, @ls)) [1]
insert#4(#true, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(::(@valX, @vals1), @key1), @ls) [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(splitqs(@z, @zs), @z) [1]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys))) [1]
sortAll(@l) → sortAll#1(@l) [1]
sortAll#1(::(@x, @xs)) → sortAll#2(@x, @xs) [1]
sortAll#1(nil) → nil [1]
sortAll#2(tuple#2(@vals, @key), @xs) → ::(tuple#2(quicksort(@vals), @key), sortAll(@xs)) [1]
split(@l) → split#1(@l) [1]
split#1(::(@x, @xs)) → insert(@x, split(@xs)) [1]
split#1(nil) → nil [1]
splitAndSort(@l) → sortAll(split(@l)) [1]
splitqs(@pivot, @l) → splitqs#1(@l, @pivot) [1]
splitqs#1(::(@x, @xs), @pivot) → splitqs#2(splitqs(@pivot, @xs), @pivot, @x) [1]
splitqs#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitqs#2(tuple#2(@ls, @rs), @pivot, @x) → splitqs#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
splitqs#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitqs#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#eq(nil, tuple#2(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), nil) → #false [0]
#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]

Rewrite Strategy: INNERMOST

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

Infered types.

(4) Obligation:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
append(@l, @ys) → append#1(@l, @ys) [1]
append#1(::(@x, @xs), @ys) → ::(@x, append(@xs, @ys)) [1]
append#1(nil, @ys) → @ys [1]
insert(@x, @l) → insert#1(@x, @l, @x) [1]
insert#1(tuple#2(@valX, @keyX), @l, @x) → insert#2(@l, @keyX, @valX, @x) [1]
insert#2(::(@l1, @ls), @keyX, @valX, @x) → insert#3(@l1, @keyX, @ls, @valX, @x) [1]
insert#2(nil, @keyX, @valX, @x) → ::(tuple#2(::(@valX, nil), @keyX), nil) [1]
insert#3(tuple#2(@vals1, @key1), @keyX, @ls, @valX, @x) → insert#4(#equal(@key1, @keyX), @key1, @ls, @valX, @vals1, @x) [1]
insert#4(#false, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(@vals1, @key1), insert(@x, @ls)) [1]
insert#4(#true, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(::(@valX, @vals1), @key1), @ls) [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(splitqs(@z, @zs), @z) [1]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys))) [1]
sortAll(@l) → sortAll#1(@l) [1]
sortAll#1(::(@x, @xs)) → sortAll#2(@x, @xs) [1]
sortAll#1(nil) → nil [1]
sortAll#2(tuple#2(@vals, @key), @xs) → ::(tuple#2(quicksort(@vals), @key), sortAll(@xs)) [1]
split(@l) → split#1(@l) [1]
split#1(::(@x, @xs)) → insert(@x, split(@xs)) [1]
split#1(nil) → nil [1]
splitAndSort(@l) → sortAll(split(@l)) [1]
splitqs(@pivot, @l) → splitqs#1(@l, @pivot) [1]
splitqs#1(::(@x, @xs), @pivot) → splitqs#2(splitqs(@pivot, @xs), @pivot, @x) [1]
splitqs#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitqs#2(tuple#2(@ls, @rs), @pivot, @x) → splitqs#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
splitqs#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitqs#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#eq(nil, tuple#2(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), nil) → #false [0]
#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]

The TRS has the following type information:
#equal :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → #false:#true
#eq :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → #false:#true
#greater :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → #false:#true
#ckgt :: #EQ:#GT:#LT → #false:#true
#compare :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → #EQ:#GT:#LT
append :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
append#1 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
:: :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
nil :: :::nil:tuple#2:#0:#neg:#pos:#s
insert :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
insert#1 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
tuple#2 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
insert#2 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
insert#3 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
insert#4 :: #false:#true → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
#false :: #false:#true
#true :: #false:#true
quicksort :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
quicksort#1 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
quicksort#2 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
splitqs :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
sortAll :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
sortAll#1 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
sortAll#2 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
split :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
split#1 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
splitAndSort :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
splitqs#1 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
splitqs#2 :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
splitqs#3 :: #false:#true → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
#and :: #false:#true → #false:#true → #false:#true
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT
#0 :: :::nil:tuple#2:#0:#neg:#pos:#s
#neg :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
#pos :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s
#s :: :::nil:tuple#2:#0:#neg:#pos:#s → :::nil:tuple#2:#0:#neg:#pos:#s

Rewrite Strategy: INNERMOST

(5) CompletionProof (UPPER BOUND(ID) transformation)

The transformation into a RNTS is sound, since:

(a) The obligation is a constructor system where every type has a constant constructor,

(b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols:


sortAll
sortAll#1
sortAll#2
splitAndSort

(c) The following functions are completely defined:

quicksort
split
#greater
#equal
splitqs
split#1
insert
splitqs#1
splitqs#2
insert#1
quicksort#1
insert#2
insert#3
splitqs#3
insert#4
quicksort#2
append
append#1
#and
#ckgt
#compare
#eq

Due to the following rules being added:

#and(v0, v1) → null_#and [0]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
#eq(v0, v1) → null_#eq [0]
split#1(v0) → null_split#1 [0]
splitqs#1(v0, v1) → null_splitqs#1 [0]
splitqs#2(v0, v1, v2) → null_splitqs#2 [0]
insert#1(v0, v1, v2) → null_insert#1 [0]
quicksort#1(v0) → null_quicksort#1 [0]
insert#2(v0, v1, v2, v3) → null_insert#2 [0]
insert#3(v0, v1, v2, v3, v4) → null_insert#3 [0]
splitqs#3(v0, v1, v2, v3) → null_splitqs#3 [0]
insert#4(v0, v1, v2, v3, v4, v5) → null_insert#4 [0]
quicksort#2(v0, v1) → null_quicksort#2 [0]
append#1(v0, v1) → null_append#1 [0]

And the following fresh constants:

null_#and, null_#ckgt, null_#compare, null_#eq, null_split#1, null_splitqs#1, null_splitqs#2, null_insert#1, null_quicksort#1, null_insert#2, null_insert#3, null_splitqs#3, null_insert#4, null_quicksort#2, null_append#1

(6) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
#greater(@x, @y) → #ckgt(#compare(@x, @y)) [1]
append(@l, @ys) → append#1(@l, @ys) [1]
append#1(::(@x, @xs), @ys) → ::(@x, append(@xs, @ys)) [1]
append#1(nil, @ys) → @ys [1]
insert(@x, @l) → insert#1(@x, @l, @x) [1]
insert#1(tuple#2(@valX, @keyX), @l, @x) → insert#2(@l, @keyX, @valX, @x) [1]
insert#2(::(@l1, @ls), @keyX, @valX, @x) → insert#3(@l1, @keyX, @ls, @valX, @x) [1]
insert#2(nil, @keyX, @valX, @x) → ::(tuple#2(::(@valX, nil), @keyX), nil) [1]
insert#3(tuple#2(@vals1, @key1), @keyX, @ls, @valX, @x) → insert#4(#equal(@key1, @keyX), @key1, @ls, @valX, @vals1, @x) [1]
insert#4(#false, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(@vals1, @key1), insert(@x, @ls)) [1]
insert#4(#true, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(::(@valX, @vals1), @key1), @ls) [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(splitqs(@z, @zs), @z) [1]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys))) [1]
sortAll(@l) → sortAll#1(@l) [1]
sortAll#1(::(@x, @xs)) → sortAll#2(@x, @xs) [1]
sortAll#1(nil) → nil [1]
sortAll#2(tuple#2(@vals, @key), @xs) → ::(tuple#2(quicksort(@vals), @key), sortAll(@xs)) [1]
split(@l) → split#1(@l) [1]
split#1(::(@x, @xs)) → insert(@x, split(@xs)) [1]
split#1(nil) → nil [1]
splitAndSort(@l) → sortAll(split(@l)) [1]
splitqs(@pivot, @l) → splitqs#1(@l, @pivot) [1]
splitqs#1(::(@x, @xs), @pivot) → splitqs#2(splitqs(@pivot, @xs), @pivot, @x) [1]
splitqs#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitqs#2(tuple#2(@ls, @rs), @pivot, @x) → splitqs#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
splitqs#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitqs#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#eq(nil, tuple#2(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), nil) → #false [0]
#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#and(v0, v1) → null_#and [0]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
#eq(v0, v1) → null_#eq [0]
split#1(v0) → null_split#1 [0]
splitqs#1(v0, v1) → null_splitqs#1 [0]
splitqs#2(v0, v1, v2) → null_splitqs#2 [0]
insert#1(v0, v1, v2) → null_insert#1 [0]
quicksort#1(v0) → null_quicksort#1 [0]
insert#2(v0, v1, v2, v3) → null_insert#2 [0]
insert#3(v0, v1, v2, v3, v4) → null_insert#3 [0]
splitqs#3(v0, v1, v2, v3) → null_splitqs#3 [0]
insert#4(v0, v1, v2, v3, v4, v5) → null_insert#4 [0]
quicksort#2(v0, v1) → null_quicksort#2 [0]
append#1(v0, v1) → null_append#1 [0]

The TRS has the following type information:
#equal :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #false:#true:null_#and:null_#ckgt:null_#eq
#eq :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #false:#true:null_#and:null_#ckgt:null_#eq
#greater :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #false:#true:null_#and:null_#ckgt:null_#eq
#ckgt :: #EQ:#GT:#LT:null_#compare → #false:#true:null_#and:null_#ckgt:null_#eq
#compare :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #EQ:#GT:#LT:null_#compare
append :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
append#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
:: :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
nil :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
tuple#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#3 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#4 :: #false:#true:null_#and:null_#ckgt:null_#eq → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#false :: #false:#true:null_#and:null_#ckgt:null_#eq
#true :: #false:#true:null_#and:null_#ckgt:null_#eq
quicksort :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
quicksort#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
quicksort#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
sortAll :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
sortAll#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
sortAll#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
split :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
split#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitAndSort :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs#3 :: #false:#true:null_#and:null_#ckgt:null_#eq → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#and :: #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq
#EQ :: #EQ:#GT:#LT:null_#compare
#GT :: #EQ:#GT:#LT:null_#compare
#LT :: #EQ:#GT:#LT:null_#compare
#0 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#neg :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#pos :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#s :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_#and :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#ckgt :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#compare :: #EQ:#GT:#LT:null_#compare
null_#eq :: #false:#true:null_#and:null_#ckgt:null_#eq
null_split#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_splitqs#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_splitqs#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_quicksort#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#3 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_splitqs#3 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#4 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_quicksort#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_append#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1

Rewrite Strategy: INNERMOST

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

Narrowed the inner basic terms of all right-hand sides by a single narrowing step.

(8) Obligation:

Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is:

Runtime Complexity Weighted TRS with Types.
The TRS R consists of the following rules:

#equal(@x, @y) → #eq(@x, @y) [1]
#greater(#0, #0) → #ckgt(#EQ) [1]
#greater(#0, #neg(@y')) → #ckgt(#GT) [1]
#greater(#0, #pos(@y'')) → #ckgt(#LT) [1]
#greater(#0, #s(@y1)) → #ckgt(#LT) [1]
#greater(#neg(@x'), #0) → #ckgt(#LT) [1]
#greater(#neg(@x''), #neg(@y2)) → #ckgt(#compare(@y2, @x'')) [1]
#greater(#neg(@x1), #pos(@y3)) → #ckgt(#LT) [1]
#greater(#pos(@x2), #0) → #ckgt(#GT) [1]
#greater(#pos(@x3), #neg(@y4)) → #ckgt(#GT) [1]
#greater(#pos(@x4), #pos(@y5)) → #ckgt(#compare(@x4, @y5)) [1]
#greater(#s(@x5), #0) → #ckgt(#GT) [1]
#greater(#s(@x6), #s(@y6)) → #ckgt(#compare(@x6, @y6)) [1]
#greater(@x, @y) → #ckgt(null_#compare) [1]
append(@l, @ys) → append#1(@l, @ys) [1]
append#1(::(@x, @xs), @ys) → ::(@x, append(@xs, @ys)) [1]
append#1(nil, @ys) → @ys [1]
insert(@x, @l) → insert#1(@x, @l, @x) [1]
insert#1(tuple#2(@valX, @keyX), @l, @x) → insert#2(@l, @keyX, @valX, @x) [1]
insert#2(::(@l1, @ls), @keyX, @valX, @x) → insert#3(@l1, @keyX, @ls, @valX, @x) [1]
insert#2(nil, @keyX, @valX, @x) → ::(tuple#2(::(@valX, nil), @keyX), nil) [1]
insert#3(tuple#2(@vals1, @key1), @keyX, @ls, @valX, @x) → insert#4(#eq(@key1, @keyX), @key1, @ls, @valX, @vals1, @x) [2]
insert#4(#false, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(@vals1, @key1), insert(@x, @ls)) [1]
insert#4(#true, @key1, @ls, @valX, @vals1, @x) → ::(tuple#2(::(@valX, @vals1), @key1), @ls) [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(splitqs#1(@zs, @z), @z) [2]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort#1(@xs), ::(@z, quicksort#1(@ys))) [3]
sortAll(@l) → sortAll#1(@l) [1]
sortAll#1(::(@x, @xs)) → sortAll#2(@x, @xs) [1]
sortAll#1(nil) → nil [1]
sortAll#2(tuple#2(@vals, @key), @xs) → ::(tuple#2(quicksort(@vals), @key), sortAll(@xs)) [1]
split(@l) → split#1(@l) [1]
split#1(::(@x, @xs)) → insert(@x, split#1(@xs)) [2]
split#1(nil) → nil [1]
splitAndSort(@l) → sortAll(split#1(@l)) [2]
splitqs(@pivot, @l) → splitqs#1(@l, @pivot) [1]
splitqs#1(::(@x, @xs), @pivot) → splitqs#2(splitqs#1(@xs, @pivot), @pivot, @x) [2]
splitqs#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitqs#2(tuple#2(@ls, @rs), @pivot, @x) → splitqs#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) [2]
splitqs#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitqs#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
#and(#false, #false) → #false [0]
#and(#false, #true) → #false [0]
#and(#true, #false) → #false [0]
#and(#true, #true) → #true [0]
#ckgt(#EQ) → #false [0]
#ckgt(#GT) → #true [0]
#ckgt(#LT) → #false [0]
#compare(#0, #0) → #EQ [0]
#compare(#0, #neg(@y)) → #GT [0]
#compare(#0, #pos(@y)) → #LT [0]
#compare(#0, #s(@y)) → #LT [0]
#compare(#neg(@x), #0) → #LT [0]
#compare(#neg(@x), #neg(@y)) → #compare(@y, @x) [0]
#compare(#neg(@x), #pos(@y)) → #LT [0]
#compare(#pos(@x), #0) → #GT [0]
#compare(#pos(@x), #neg(@y)) → #GT [0]
#compare(#pos(@x), #pos(@y)) → #compare(@x, @y) [0]
#compare(#s(@x), #0) → #GT [0]
#compare(#s(@x), #s(@y)) → #compare(@x, @y) [0]
#eq(#0, #0) → #true [0]
#eq(#0, #neg(@y)) → #false [0]
#eq(#0, #pos(@y)) → #false [0]
#eq(#0, #s(@y)) → #false [0]
#eq(#neg(@x), #0) → #false [0]
#eq(#neg(@x), #neg(@y)) → #eq(@x, @y) [0]
#eq(#neg(@x), #pos(@y)) → #false [0]
#eq(#pos(@x), #0) → #false [0]
#eq(#pos(@x), #neg(@y)) → #false [0]
#eq(#pos(@x), #pos(@y)) → #eq(@x, @y) [0]
#eq(#s(@x), #0) → #false [0]
#eq(#s(@x), #s(@y)) → #eq(@x, @y) [0]
#eq(::(@x_1, @x_2), ::(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#eq(::(@x_1, @x_2), nil) → #false [0]
#eq(::(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #false [0]
#eq(nil, ::(@y_1, @y_2)) → #false [0]
#eq(nil, nil) → #true [0]
#eq(nil, tuple#2(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), ::(@y_1, @y_2)) → #false [0]
#eq(tuple#2(@x_1, @x_2), nil) → #false [0]
#eq(tuple#2(@x_1, @x_2), tuple#2(@y_1, @y_2)) → #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) [0]
#and(v0, v1) → null_#and [0]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
#eq(v0, v1) → null_#eq [0]
split#1(v0) → null_split#1 [0]
splitqs#1(v0, v1) → null_splitqs#1 [0]
splitqs#2(v0, v1, v2) → null_splitqs#2 [0]
insert#1(v0, v1, v2) → null_insert#1 [0]
quicksort#1(v0) → null_quicksort#1 [0]
insert#2(v0, v1, v2, v3) → null_insert#2 [0]
insert#3(v0, v1, v2, v3, v4) → null_insert#3 [0]
splitqs#3(v0, v1, v2, v3) → null_splitqs#3 [0]
insert#4(v0, v1, v2, v3, v4, v5) → null_insert#4 [0]
quicksort#2(v0, v1) → null_quicksort#2 [0]
append#1(v0, v1) → null_append#1 [0]

The TRS has the following type information:
#equal :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #false:#true:null_#and:null_#ckgt:null_#eq
#eq :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #false:#true:null_#and:null_#ckgt:null_#eq
#greater :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #false:#true:null_#and:null_#ckgt:null_#eq
#ckgt :: #EQ:#GT:#LT:null_#compare → #false:#true:null_#and:null_#ckgt:null_#eq
#compare :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → #EQ:#GT:#LT:null_#compare
append :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
append#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
:: :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
nil :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
tuple#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#3 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
insert#4 :: #false:#true:null_#and:null_#ckgt:null_#eq → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#false :: #false:#true:null_#and:null_#ckgt:null_#eq
#true :: #false:#true:null_#and:null_#ckgt:null_#eq
quicksort :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
quicksort#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
quicksort#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
sortAll :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
sortAll#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
sortAll#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
split :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
split#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitAndSort :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
splitqs#3 :: #false:#true:null_#and:null_#ckgt:null_#eq → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#and :: #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq → #false:#true:null_#and:null_#ckgt:null_#eq
#EQ :: #EQ:#GT:#LT:null_#compare
#GT :: #EQ:#GT:#LT:null_#compare
#LT :: #EQ:#GT:#LT:null_#compare
#0 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#neg :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#pos :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
#s :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1 → :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_#and :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#ckgt :: #false:#true:null_#and:null_#ckgt:null_#eq
null_#compare :: #EQ:#GT:#LT:null_#compare
null_#eq :: #false:#true:null_#and:null_#ckgt:null_#eq
null_split#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_splitqs#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_splitqs#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_quicksort#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#3 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_splitqs#3 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_insert#4 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_quicksort#2 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1
null_append#1 :: :::nil:tuple#2:#0:#neg:#pos:#s:null_split#1:null_splitqs#1:null_splitqs#2:null_insert#1:null_quicksort#1:null_insert#2:null_insert#3:null_splitqs#3:null_insert#4:null_quicksort#2:null_append#1

Rewrite Strategy: INNERMOST

(9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID) transformation)

Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction.
The constant constructors are abstracted as follows:

nil => 1
#false => 1
#true => 2
#EQ => 1
#GT => 2
#LT => 3
#0 => 0
null_#and => 0
null_#ckgt => 0
null_#compare => 0
null_#eq => 0
null_split#1 => 0
null_splitqs#1 => 0
null_splitqs#2 => 0
null_insert#1 => 0
null_quicksort#1 => 0
null_insert#2 => 0
null_insert#3 => 0
null_splitqs#3 => 0
null_insert#4 => 0
null_quicksort#2 => 0
null_append#1 => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#compare(z, z') -{ 0 }→ #compare(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ #compare(@y, @x) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#eq(z, z') -{ 0 }→ #eq(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: z' = 1 + @y'', @y'' >= 0, z = 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: z' = 1 + @y1, @y1 >= 0, z = 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: z = 1 + @x', @x' >= 0, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(3) :|: @y3 >= 0, @x1 >= 0, z' = 1 + @y3, z = 1 + @x1
#greater(z, z') -{ 1 }→ #ckgt(2) :|: @y' >= 0, z' = 1 + @y', z = 0
#greater(z, z') -{ 1 }→ #ckgt(2) :|: @x2 >= 0, z = 1 + @x2, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(2) :|: @x3 >= 0, z' = 1 + @y4, z = 1 + @x3, @y4 >= 0
#greater(z, z') -{ 1 }→ #ckgt(2) :|: z = 1 + @x5, @x5 >= 0, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(1) :|: z = 0, z' = 0
#greater(z, z') -{ 1 }→ #ckgt(0) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x4, @y5)) :|: z' = 1 + @y5, @y5 >= 0, z = 1 + @x4, @x4 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x6, @y6)) :|: z = 1 + @x6, z' = 1 + @y6, @x6 >= 0, @y6 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@y2, @x'')) :|: z = 1 + @x'', z' = 1 + @y2, @y2 >= 0, @x'' >= 0
append(z, z') -{ 1 }→ append#1(@l, @ys) :|: z = @l, @l >= 0, z' = @ys, @ys >= 0
append#1(z, z') -{ 1 }→ @ys :|: z' = @ys, z = 1, @ys >= 0
append#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, @ys) :|: z' = @ys, @x >= 0, z = 1 + @x + @xs, @xs >= 0, @ys >= 0
insert(z, z') -{ 1 }→ insert#1(@x, @l, @x) :|: z = @x, @l >= 0, @x >= 0, z' = @l
insert#1(z, z', z'') -{ 1 }→ insert#2(@l, @keyX, @valX, @x) :|: @valX >= 0, @keyX >= 0, @l >= 0, z = 1 + @valX + @keyX, @x >= 0, z' = @l, z'' = @x
insert#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, @keyX, @ls, @valX, @x) :|: z1 = @x, @ls >= 0, @keyX >= 0, @valX >= 0, @l1 >= 0, @x >= 0, z = 1 + @l1 + @ls, z'' = @valX, z' = @keyX
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + @valX + 1) + @keyX) + 1 :|: z1 = @x, @keyX >= 0, @valX >= 0, @x >= 0, z = 1, z'' = @valX, z' = @keyX
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, @keyX), @key1, @ls, @valX, @vals1, @x) :|: @key1 >= 0, @keyX >= 0, @ls >= 0, @valX >= 0, @x >= 0, @vals1 >= 0, z1 = @valX, z2 = @x, z = 1 + @vals1 + @key1, z' = @keyX, z'' = @ls
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z1 = v3, z3 = v5, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, v5 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + @vals1 + @key1) + insert(@x, @ls) :|: @key1 >= 0, @ls >= 0, @valX >= 0, @x >= 0, @vals1 >= 0, z = 1, z1 = @valX, z2 = @vals1, z' = @key1, z3 = @x, z'' = @ls
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + @valX + @vals1) + @key1) + @ls :|: z = 2, @key1 >= 0, @ls >= 0, @valX >= 0, @x >= 0, @vals1 >= 0, z1 = @valX, z2 = @vals1, z' = @key1, z3 = @x, z'' = @ls
quicksort(z) -{ 1 }→ quicksort#1(@l) :|: z = @l, @l >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + @z + quicksort#1(@ys)) :|: z' = @z, z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, @z >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
sortAll(z) -{ 1 }→ sortAll#1(@l) :|: z = @l, @l >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(@xs) :|: z' = @xs, @vals >= 0, z = 1 + @vals + @key, @xs >= 0, @key >= 0
split(z) -{ 1 }→ split#1(@l) :|: z = @l, @l >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
splitAndSort(z) -{ 2 }→ sortAll(split#1(@l)) :|: z = @l, @l >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(@l, @pivot) :|: @l >= 0, z = @pivot, z' = @l, @pivot >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, @pivot), @pivot, @x) :|: @x >= 0, z = 1 + @x + @xs, z' = @pivot, @xs >= 0, @pivot >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' = @pivot, @pivot >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) :|: @ls >= 0, z = 1 + @ls + @rs, @x >= 0, z' = @pivot, @pivot >= 0, z'' = @x, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + @ls + (1 + @x + @rs) :|: z = 2, z1 = @x, @ls >= 0, @x >= 0, z' = @ls, @rs >= 0, z'' = @rs
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + @x + @ls) + @rs :|: z1 = @x, @ls >= 0, @x >= 0, z = 1, z' = @ls, @rs >= 0, z'' = @rs

(11) InliningProof (UPPER BOUND(ID) transformation)

Inlined the following terminating rules on right-hand sides where appropriate:

splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + @x + @ls) + @rs :|: z1 = @x, @ls >= 0, @x >= 0, z = 1, z' = @ls, @rs >= 0, z'' = @rs
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + @ls + (1 + @x + @rs) :|: z = 2, z1 = @x, @ls >= 0, @x >= 0, z' = @ls, @rs >= 0, z'' = @rs
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0

(12) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#compare(z, z') -{ 0 }→ #compare(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#compare(z, z') -{ 0 }→ #compare(@y, @x) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
#eq(z, z') -{ 0 }→ #eq(@x, @y) :|: @x >= 0, z = 1 + @x, z' = 1 + @y, @y >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(@x, @y) :|: z = @x, @x >= 0, z' = @y, @y >= 0
#greater(z, z') -{ 1 }→ 2 :|: @y' >= 0, z' = 1 + @y', z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: @x2 >= 0, z = 1 + @x2, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: @x3 >= 0, z' = 1 + @y4, z = 1 + @x3, @y4 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z = 1 + @x5, @x5 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' = 1 + @y'', @y'' >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' = 1 + @y1, @y1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z = 1 + @x', @x' >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: @y3 >= 0, @x1 >= 0, z' = 1 + @y3, z = 1 + @x1, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: @y' >= 0, z' = 1 + @y', z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' = 1 + @y'', @y'' >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' = 1 + @y1, @y1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z = 1 + @x', @x' >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: @y3 >= 0, @x1 >= 0, z' = 1 + @y3, z = 1 + @x1, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: @x2 >= 0, z = 1 + @x2, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: @x3 >= 0, z' = 1 + @y4, z = 1 + @x3, @y4 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z = 1 + @x5, @x5 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z = @x, @x >= 0, z' = @y, @y >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x4, @y5)) :|: z' = 1 + @y5, @y5 >= 0, z = 1 + @x4, @x4 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@x6, @y6)) :|: z = 1 + @x6, z' = 1 + @y6, @x6 >= 0, @y6 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(@y2, @x'')) :|: z = 1 + @x'', z' = 1 + @y2, @y2 >= 0, @x'' >= 0
append(z, z') -{ 1 }→ append#1(@l, @ys) :|: z = @l, @l >= 0, z' = @ys, @ys >= 0
append#1(z, z') -{ 1 }→ @ys :|: z' = @ys, z = 1, @ys >= 0
append#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, @ys) :|: z' = @ys, @x >= 0, z = 1 + @x + @xs, @xs >= 0, @ys >= 0
insert(z, z') -{ 1 }→ insert#1(@x, @l, @x) :|: z = @x, @l >= 0, @x >= 0, z' = @l
insert#1(z, z', z'') -{ 1 }→ insert#2(@l, @keyX, @valX, @x) :|: @valX >= 0, @keyX >= 0, @l >= 0, z = 1 + @valX + @keyX, @x >= 0, z' = @l, z'' = @x
insert#1(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, @keyX, @ls, @valX, @x) :|: z1 = @x, @ls >= 0, @keyX >= 0, @valX >= 0, @l1 >= 0, @x >= 0, z = 1 + @l1 + @ls, z'' = @valX, z' = @keyX
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + @valX + 1) + @keyX) + 1 :|: z1 = @x, @keyX >= 0, @valX >= 0, @x >= 0, z = 1, z'' = @valX, z' = @keyX
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, @keyX), @key1, @ls, @valX, @vals1, @x) :|: @key1 >= 0, @keyX >= 0, @ls >= 0, @valX >= 0, @x >= 0, @vals1 >= 0, z1 = @valX, z2 = @x, z = 1 + @vals1 + @key1, z' = @keyX, z'' = @ls
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z1 = v3, z3 = v5, v0 >= 0, v4 >= 0, z'' = v2, v1 >= 0, v5 >= 0, z = v0, z' = v1, z2 = v4, v2 >= 0, v3 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + @vals1 + @key1) + insert(@x, @ls) :|: @key1 >= 0, @ls >= 0, @valX >= 0, @x >= 0, @vals1 >= 0, z = 1, z1 = @valX, z2 = @vals1, z' = @key1, z3 = @x, z'' = @ls
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + @valX + @vals1) + @key1) + @ls :|: z = 2, @key1 >= 0, @ls >= 0, @valX >= 0, @x >= 0, @vals1 >= 0, z1 = @valX, z2 = @vals1, z' = @key1, z3 = @x, z'' = @ls
quicksort(z) -{ 1 }→ quicksort#1(@l) :|: z = @l, @l >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + @z + quicksort#1(@ys)) :|: z' = @z, z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, @z >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
sortAll(z) -{ 1 }→ sortAll#1(@l) :|: z = @l, @l >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(@xs) :|: z' = @xs, @vals >= 0, z = 1 + @vals + @key, @xs >= 0, @key >= 0
split(z) -{ 1 }→ split#1(@l) :|: z = @l, @l >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
splitAndSort(z) -{ 2 }→ sortAll(split#1(@l)) :|: z = @l, @l >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(@l, @pivot) :|: @l >= 0, z = @pivot, z' = @l, @pivot >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, @pivot), @pivot, @x) :|: @x >= 0, z = 1 + @x + @xs, z' = @pivot, @xs >= 0, @pivot >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' = @pivot, @pivot >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) :|: @ls >= 0, z = 1 + @ls + @rs, @x >= 0, z' = @pivot, @pivot >= 0, z'' = @x, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + @ls + (1 + @x + @rs) :|: z = 2, z1 = @x, @ls >= 0, @x >= 0, z' = @ls, @rs >= 0, z'' = @rs
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + @x + @ls) + @rs :|: z1 = @x, @ls >= 0, @x >= 0, z = 1, z' = @ls, @rs >= 0, z'' = @rs

(13) SimplificationProof (BOTH BOUNDS(ID, ID) transformation)

Simplified the RNTS by moving equalities from the constraints into the right-hand sides.

(14) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

(15) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID) transformation)

Found the following analysis order by SCC decomposition:

{ #and }
{ #compare }
{ #ckgt }
{ splitqs#3 }
{ append#1, append }
{ #eq }
{ splitqs#2 }
{ #greater }
{ insert#4, insert#2, insert, insert#3, insert#1 }
{ #equal }
{ splitqs#1 }
{ split#1 }
{ splitqs }
{ quicksort#1, quicksort#2 }
{ split }
{ quicksort }
{ sortAll#2, sortAll, sortAll#1 }
{ splitAndSort }

(16) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#and}, {#compare}, {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}

(17) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(18) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#and}, {#compare}, {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: ?, size: O(1) [2]

(19) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #and
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(20) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#compare}, {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]

(21) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(22) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#compare}, {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]

(23) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #compare
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 3

(24) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#compare}, {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: ?, size: O(1) [3]

(25) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #compare
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(26) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#compare(z, z') -{ 0 }→ #compare(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ #compare(z' - 1, z - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z - 1, z' - 1)) :|: z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(#compare(z' - 1, z - 1)) :|: z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]

(27) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(28) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(s'') :|: s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s1) :|: s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(s2), @ls, @rs, z'') :|: s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]

(29) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #ckgt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(30) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(s'') :|: s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s1) :|: s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(s2), @ls, @rs, z'') :|: s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#ckgt}, {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: ?, size: O(1) [2]

(31) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #ckgt
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(32) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
#greater(z, z') -{ 1 }→ #ckgt(s'') :|: s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s1) :|: s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(#ckgt(s2), @ls, @rs, z'') :|: s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]

(33) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(34) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(s5, @ls, @rs, z'') :|: s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]

(35) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: splitqs#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z' + z'' + z1

(36) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(s5, @ls, @rs, z'') :|: s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#3}, {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: ?, size: O(n1) [2 + z' + z'' + z1]

(37) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: splitqs#3
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(38) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 2 }→ splitqs#3(s5, @ls, @rs, z'') :|: s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]

(39) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(40) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]

(41) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: append#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z + z'

Computed SIZE bound using CoFloCo for: append
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z + z'

(42) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {append#1,append}, {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: ?, size: O(n1) [z + z']
append: runtime: ?, size: O(n1) [z + z']

(43) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: append#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 2·z

Computed RUNTIME bound using CoFloCo for: append
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + 2·z

(44) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 1 }→ append#1(z, z') :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']

(45) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(46) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']

(47) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(48) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#eq}, {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: ?, size: O(1) [2]

(49) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #eq
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 0

(50) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ #eq(z - 1, z' - 1) :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ #and(#eq(@x_1, @y_1), #eq(@x_2, @y_2)) :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#equal(z, z') -{ 1 }→ #eq(z, z') :|: z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(#eq(@key1, z'), @key1, z'', z1, @vals1, z2) :|: @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]

(51) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(52) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]

(53) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: splitqs#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + z + z''

(54) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#2}, {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: ?, size: O(n1) [1 + z + z'']

(55) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: splitqs#2
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 3

(56) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']

(57) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(58) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']

(59) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #greater
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(60) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#greater}, {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: ?, size: O(1) [2]

(61) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #greater
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(62) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]

(63) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(64) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]

(65) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: insert#4
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 6 + z' + z'' + z1 + z2 + z3

Computed SIZE bound using CoFloCo for: insert#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 5 + z + z' + z'' + z1

Computed SIZE bound using CoFloCo for: insert
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4 + 2·z + z'

Computed SIZE bound using CoFloCo for: insert#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 5 + z + z'' + z1 + z2

Computed SIZE bound using CoFloCo for: insert#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4 + z + z' + z''

(66) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {insert#4,insert#2,insert,insert#3,insert#1}, {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: ?, size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: ?, size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: ?, size: O(n1) [4 + 2·z + z']
insert#3: runtime: ?, size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: ?, size: O(n1) [4 + z + z' + z'']

(67) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using PUBS for: insert#4
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4 + 6·z''

Computed RUNTIME bound using CoFloCo for: insert#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 7 + 6·z

Computed RUNTIME bound using CoFloCo for: insert
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 9 + 6·z'

Computed RUNTIME bound using CoFloCo for: insert#3
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 6 + 6·z''

Computed RUNTIME bound using CoFloCo for: insert#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 8 + 6·z'

(68) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 1 }→ insert#1(z, z', z) :|: z' >= 0, z >= 0
insert#1(z, z', z'') -{ 1 }→ insert#2(z', @keyX, @valX, z'') :|: @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 1 }→ insert#3(@l1, z', @ls, z'', z1) :|: @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 2 }→ insert#4(s10, @key1, z'', z1, @vals1, z2) :|: s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + z2 + z') + insert(z3, z'') :|: z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']

(69) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(70) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']

(71) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: #equal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 2

(72) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {#equal}, {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: ?, size: O(1) [2]

(73) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: #equal
after applying outer abstraction to obtain an ITS,
resulting in: O(1) with polynomial bound: 1

(74) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]

(75) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(76) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]

(77) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: splitqs#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z

(78) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs#1}, {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: ?, size: O(n1) [2 + z]

(79) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: splitqs#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 5·z

(80) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(splitqs#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 1 }→ splitqs#1(z', z) :|: z' >= 0, z >= 0
splitqs#1(z, z') -{ 2 }→ splitqs#2(splitqs#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]

(81) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(82) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]

(83) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using KoAT for: split#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4·z

(84) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {split#1}, {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: ?, size: O(n1) [4·z]

(85) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: split#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 1 + 11·z + 24·z2

(86) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 1 }→ split#1(z) :|: z >= 0
split#1(z) -{ 2 }→ insert(@x, split#1(@xs)) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 2 }→ sortAll(split#1(z)) :|: z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]

(87) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(88) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]

(89) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: splitqs
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + z'

(90) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitqs}, {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: ?, size: O(n1) [2 + z']

(91) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: splitqs
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2 + 5·z'

(92) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']

(93) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(94) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']

(95) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: quicksort#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 2·z

Computed SIZE bound using CoFloCo for: quicksort#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 2·z + z'

(96) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {quicksort#1,quicksort#2}, {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: ?, size: O(n1) [1 + 2·z]
quicksort#2: runtime: ?, size: O(n1) [1 + 2·z + z']

(97) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using CoFloCo for: quicksort#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 59 + 164·z + 90·z2

Computed RUNTIME bound using KoAT for: quicksort#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 125 + 332·z + 180·z2

(98) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s20, @z) :|: s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 3 }→ append(quicksort#1(@xs), 1 + z' + quicksort#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']

(99) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(100) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']

(101) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: split
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 4·z

(102) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {split}, {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: ?, size: O(n1) [4·z]

(103) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: split
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 2 + 11·z + 24·z2

(104) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]

(105) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(106) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]

(107) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: quicksort
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 1 + 2·z

(108) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {quicksort}, {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: ?, size: O(n1) [1 + 2·z]

(109) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: quicksort
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 60 + 164·z + 90·z2

(110) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 1 }→ 1 + (1 + quicksort(@vals) + @key) + sortAll(z') :|: @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]

(111) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(112) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 61 + 164·@vals + 90·@vals2 }→ 1 + (1 + s33 + @key) + sortAll(z') :|: s33 >= 0, s33 <= 2 * @vals + 1, @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]

(113) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using PUBS for: sortAll#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z + 2·z'

Computed SIZE bound using KoAT for: sortAll
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z

Computed SIZE bound using KoAT for: sortAll#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 2·z

(114) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 61 + 164·@vals + 90·@vals2 }→ 1 + (1 + s33 + @key) + sortAll(z') :|: s33 >= 0, s33 <= 2 * @vals + 1, @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {sortAll#2,sortAll,sortAll#1}, {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
sortAll#2: runtime: ?, size: O(n1) [2·z + 2·z']
sortAll: runtime: ?, size: O(n1) [2·z]
sortAll#1: runtime: ?, size: O(n1) [2·z]

(115) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: sortAll#2
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 127 + 328·z + 492·z·z' + 180·z2 + 270·z2·z' + 517·z' + 672·z'2 + 270·z'3

Computed RUNTIME bound using KoAT for: sortAll
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 130 + 845·z + 1344·z2 + 540·z3

Computed RUNTIME bound using KoAT for: sortAll#1
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 129 + 845·z + 1344·z2 + 540·z3

(116) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 1 }→ sortAll#1(z) :|: z >= 0
sortAll#1(z) -{ 1 }→ sortAll#2(@x, @xs) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 61 + 164·@vals + 90·@vals2 }→ 1 + (1 + s33 + @key) + sortAll(z') :|: s33 >= 0, s33 <= 2 * @vals + 1, @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 3 + 11·z + 24·z2 }→ sortAll(s27) :|: s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
sortAll#2: runtime: O(n3) [127 + 328·z + 492·z·z' + 180·z2 + 270·z2·z' + 517·z' + 672·z'2 + 270·z'3], size: O(n1) [2·z + 2·z']
sortAll: runtime: O(n3) [130 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]
sortAll#1: runtime: O(n3) [129 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]

(117) ResultPropagationProof (UPPER BOUND(ID) transformation)

Applied inner abstraction using the recently inferred runtime/size bounds where possible.

(118) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 130 + 845·z + 1344·z2 + 540·z3 }→ s34 :|: s34 >= 0, s34 <= 2 * z, z >= 0
sortAll#1(z) -{ 128 + 328·@x + 492·@x·@xs + 180·@x2 + 270·@x2·@xs + 517·@xs + 672·@xs2 + 270·@xs3 }→ s35 :|: s35 >= 0, s35 <= 2 * @x + 2 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 191 + 164·@vals + 90·@vals2 + 845·z' + 1344·z'2 + 540·z'3 }→ 1 + (1 + s33 + @key) + s36 :|: s36 >= 0, s36 <= 2 * z', s33 >= 0, s33 <= 2 * @vals + 1, @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 133 + 845·s27 + 1344·s272 + 540·s273 + 11·z + 24·z2 }→ s37 :|: s37 >= 0, s37 <= 2 * s27, s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
sortAll#2: runtime: O(n3) [127 + 328·z + 492·z·z' + 180·z2 + 270·z2·z' + 517·z' + 672·z'2 + 270·z'3], size: O(n1) [2·z + 2·z']
sortAll: runtime: O(n3) [130 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]
sortAll#1: runtime: O(n3) [129 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]

(119) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed SIZE bound using CoFloCo for: splitAndSort
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: 8·z

(120) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 130 + 845·z + 1344·z2 + 540·z3 }→ s34 :|: s34 >= 0, s34 <= 2 * z, z >= 0
sortAll#1(z) -{ 128 + 328·@x + 492·@x·@xs + 180·@x2 + 270·@x2·@xs + 517·@xs + 672·@xs2 + 270·@xs3 }→ s35 :|: s35 >= 0, s35 <= 2 * @x + 2 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 191 + 164·@vals + 90·@vals2 + 845·z' + 1344·z'2 + 540·z'3 }→ 1 + (1 + s33 + @key) + s36 :|: s36 >= 0, s36 <= 2 * z', s33 >= 0, s33 <= 2 * @vals + 1, @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 133 + 845·s27 + 1344·s272 + 540·s273 + 11·z + 24·z2 }→ s37 :|: s37 >= 0, s37 <= 2 * s27, s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed: {splitAndSort}
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
sortAll#2: runtime: O(n3) [127 + 328·z + 492·z·z' + 180·z2 + 270·z2·z' + 517·z' + 672·z'2 + 270·z'3], size: O(n1) [2·z + 2·z']
sortAll: runtime: O(n3) [130 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]
sortAll#1: runtime: O(n3) [129 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]
splitAndSort: runtime: ?, size: O(n1) [8·z]

(121) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: splitAndSort
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 133 + 3391·z + 21528·z2 + 34560·z3

(122) Obligation:

Complexity RNTS consisting of the following rules:

#and(z, z') -{ 0 }→ 2 :|: z = 2, z' = 2
#and(z, z') -{ 0 }→ 1 :|: z = 1, z' = 1
#and(z, z') -{ 0 }→ 1 :|: z' = 2, z = 1
#and(z, z') -{ 0 }→ 1 :|: z = 2, z' = 1
#and(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#ckgt(z) -{ 0 }→ 2 :|: z = 2
#ckgt(z) -{ 0 }→ 1 :|: z = 1
#ckgt(z) -{ 0 }→ 1 :|: z = 3
#ckgt(z) -{ 0 }→ 0 :|: z >= 0
#compare(z, z') -{ 0 }→ s :|: s >= 0, s <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ s' :|: s' >= 0, s' <= 3, z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 3 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z = 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' = 0
#compare(z, z') -{ 0 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0
#compare(z, z') -{ 0 }→ 1 :|: z = 0, z' = 0
#compare(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#eq(z, z') -{ 0 }→ s11 :|: s11 >= 0, s11 <= 2, z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ s14 :|: s12 >= 0, s12 <= 2, s13 >= 0, s13 <= 2, s14 >= 0, s14 <= 2, @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 2 :|: z = 0, z' = 0
#eq(z, z') -{ 0 }→ 2 :|: z = 1, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: z = 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' = 0
#eq(z, z') -{ 0 }→ 1 :|: z - 1 >= 0, z' - 1 >= 0
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @x_2 >= 0, z' = 1
#eq(z, z') -{ 0 }→ 1 :|: @x_1 >= 0, z = 1 + @x_1 + @x_2, @y_1 >= 0, @x_2 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 1 :|: z = 1, @y_1 >= 0, @y_2 >= 0, z' = 1 + @y_1 + @y_2
#eq(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
#equal(z, z') -{ 1 }→ s9 :|: s9 >= 0, s9 <= 2, z >= 0, z' >= 0
#greater(z, z') -{ 1 }→ s3 :|: s3 >= 0, s3 <= 2, s'' >= 0, s'' <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s4 :|: s4 >= 0, s4 <= 2, s1 >= 0, s1 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ 2 :|: z' - 1 >= 0, z = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' = 0, 2 = 2
#greater(z, z') -{ 1 }→ 2 :|: z - 1 >= 0, z' - 1 >= 0, 2 = 2
#greater(z, z') -{ 1 }→ 1 :|: z = 0, z' = 0, 1 = 1
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z - 1 >= 0, z' = 0, 3 = 3
#greater(z, z') -{ 1 }→ 1 :|: z' - 1 >= 0, z - 1 >= 0, 3 = 3
#greater(z, z') -{ 1 }→ 0 :|: z = 0, z' = 0, v0 >= 0, 1 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z' - 1 >= 0, z - 1 >= 0, v0 >= 0, 3 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' = 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z - 1 >= 0, z' - 1 >= 0, v0 >= 0, 2 = v0
#greater(z, z') -{ 1 }→ 0 :|: z >= 0, z' >= 0, v0 >= 0, 0 = v0
append(z, z') -{ 2 + 2·z }→ s7 :|: s7 >= 0, s7 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 1, z' >= 0
append#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s8 :|: s8 >= 0, s8 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
insert(z, z') -{ 9 + 6·z' }→ s15 :|: s15 >= 0, s15 <= 1 * z + 1 * z' + 1 * z + 4, z' >= 0, z >= 0
insert#1(z, z', z'') -{ 8 + 6·z' }→ s16 :|: s16 >= 0, s16 <= 1 * z' + 1 * @valX + 1 * z'' + 5 + 1 * @keyX, @valX >= 0, @keyX >= 0, z' >= 0, z = 1 + @valX + @keyX, z'' >= 0
insert#1(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
insert#2(z, z', z'', z1) -{ 7 + 6·@ls }→ s17 :|: s17 >= 0, s17 <= 1 * @l1 + 1 * @ls + 1 * z'' + 1 * z1 + 5, @ls >= 0, z' >= 0, z'' >= 0, @l1 >= 0, z1 >= 0, z = 1 + @l1 + @ls
insert#2(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#2(z, z', z'', z1) -{ 1 }→ 1 + (1 + (1 + z'' + 1) + z') + 1 :|: z' >= 0, z'' >= 0, z1 >= 0, z = 1
insert#3(z, z', z'', z1, z2) -{ 6 + 6·z'' }→ s18 :|: s18 >= 0, s18 <= 1 * @key1 + 1 * z'' + 1 * @vals1 + 1 * z2 + 6 + 1 * z1, s10 >= 0, s10 <= 2, @key1 >= 0, z' >= 0, z'' >= 0, z1 >= 0, z2 >= 0, @vals1 >= 0, z = 1 + @vals1 + @key1
insert#3(z, z', z'', z1, z2) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 0 }→ 0 :|: z >= 0, z2 >= 0, z' >= 0, z3 >= 0, z'' >= 0, z1 >= 0
insert#4(z, z', z'', z1, z2, z3) -{ 10 + 6·z'' }→ 1 + (1 + z2 + z') + s19 :|: s19 >= 0, s19 <= 2 * z3 + 1 * z'' + 4, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0, z = 1
insert#4(z, z', z'', z1, z2, z3) -{ 1 }→ 1 + (1 + (1 + z1 + z2) + z') + z'' :|: z = 2, z' >= 0, z'' >= 0, z1 >= 0, z3 >= 0, z2 >= 0
quicksort(z) -{ 60 + 164·z + 90·z2 }→ s28 :|: s28 >= 0, s28 <= 1 + 2 * z, z >= 0
quicksort#1(z) -{ 128 + 5·@zs + 332·s20 + 180·s202 }→ s29 :|: s29 >= 0, s29 <= 2 * s20 + 1 * @z + 1, s20 >= 0, s20 <= 1 * @zs + 2, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 1 :|: z = 1
quicksort#1(z) -{ 0 }→ 0 :|: z >= 0
quicksort#2(z, z') -{ 123 + 164·@xs + 90·@xs2 + 164·@ys + 90·@ys2 + 2·s30 }→ s32 :|: s30 >= 0, s30 <= 1 + 2 * @xs, s31 >= 0, s31 <= 1 + 2 * @ys, s32 >= 0, s32 <= 1 * s30 + 1 * (1 + z' + s31), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
sortAll(z) -{ 130 + 845·z + 1344·z2 + 540·z3 }→ s34 :|: s34 >= 0, s34 <= 2 * z, z >= 0
sortAll#1(z) -{ 128 + 328·@x + 492·@x·@xs + 180·@x2 + 270·@x2·@xs + 517·@xs + 672·@xs2 + 270·@xs3 }→ s35 :|: s35 >= 0, s35 <= 2 * @x + 2 * @xs, @x >= 0, z = 1 + @x + @xs, @xs >= 0
sortAll#1(z) -{ 1 }→ 1 :|: z = 1
sortAll#2(z, z') -{ 191 + 164·@vals + 90·@vals2 + 845·z' + 1344·z'2 + 540·z'3 }→ 1 + (1 + s33 + @key) + s36 :|: s36 >= 0, s36 <= 2 * z', s33 >= 0, s33 <= 2 * @vals + 1, @vals >= 0, z = 1 + @vals + @key, z' >= 0, @key >= 0
split(z) -{ 2 + 11·z + 24·z2 }→ s24 :|: s24 >= 0, s24 <= 4 * z, z >= 0
split#1(z) -{ 12 + 11·@xs + 24·@xs2 + 6·s25 }→ s26 :|: s25 >= 0, s25 <= 4 * @xs, s26 >= 0, s26 <= 2 * @x + 1 * s25 + 4, @x >= 0, z = 1 + @x + @xs, @xs >= 0
split#1(z) -{ 1 }→ 1 :|: z = 1
split#1(z) -{ 0 }→ 0 :|: z >= 0
splitAndSort(z) -{ 133 + 845·s27 + 1344·s272 + 540·s273 + 11·z + 24·z2 }→ s37 :|: s37 >= 0, s37 <= 2 * s27, s27 >= 0, s27 <= 4 * z, z >= 0
splitqs(z, z') -{ 2 + 5·z' }→ s21 :|: s21 >= 0, s21 <= 1 * z' + 2, z' >= 0, z >= 0
splitqs#1(z, z') -{ 6 + 5·@xs }→ s23 :|: s22 >= 0, s22 <= 1 * @xs + 2, s23 >= 0, s23 <= 1 * s22 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitqs#1(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
splitqs#1(z, z') -{ 1 }→ 1 + 1 + 1 :|: z = 1, z' >= 0
splitqs#2(z, z', z'') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 2, s2 >= 0, s2 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitqs#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitqs#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0

Function symbols to be analyzed:
Previous analysis results are:
#and: runtime: O(1) [0], size: O(1) [2]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
splitqs#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
append#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
append: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
#eq: runtime: O(1) [0], size: O(1) [2]
splitqs#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
insert#4: runtime: O(n1) [4 + 6·z''], size: O(n1) [6 + z' + z'' + z1 + z2 + z3]
insert#2: runtime: O(n1) [7 + 6·z], size: O(n1) [5 + z + z' + z'' + z1]
insert: runtime: O(n1) [9 + 6·z'], size: O(n1) [4 + 2·z + z']
insert#3: runtime: O(n1) [6 + 6·z''], size: O(n1) [5 + z + z'' + z1 + z2]
insert#1: runtime: O(n1) [8 + 6·z'], size: O(n1) [4 + z + z' + z'']
#equal: runtime: O(1) [1], size: O(1) [2]
splitqs#1: runtime: O(n1) [1 + 5·z], size: O(n1) [2 + z]
split#1: runtime: O(n2) [1 + 11·z + 24·z2], size: O(n1) [4·z]
splitqs: runtime: O(n1) [2 + 5·z'], size: O(n1) [2 + z']
quicksort#1: runtime: O(n2) [59 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
quicksort#2: runtime: O(n2) [125 + 332·z + 180·z2], size: O(n1) [1 + 2·z + z']
split: runtime: O(n2) [2 + 11·z + 24·z2], size: O(n1) [4·z]
quicksort: runtime: O(n2) [60 + 164·z + 90·z2], size: O(n1) [1 + 2·z]
sortAll#2: runtime: O(n3) [127 + 328·z + 492·z·z' + 180·z2 + 270·z2·z' + 517·z' + 672·z'2 + 270·z'3], size: O(n1) [2·z + 2·z']
sortAll: runtime: O(n3) [130 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]
sortAll#1: runtime: O(n3) [129 + 845·z + 1344·z2 + 540·z3], size: O(n1) [2·z]
splitAndSort: runtime: O(n3) [133 + 3391·z + 21528·z2 + 34560·z3], size: O(n1) [8·z]

(123) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(124) BOUNDS(1, n^3)