(0) Obligation:

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


The TRS R consists of the following rules:

#abs(#0) → #0
#abs(#neg(@x)) → #pos(@x)
#abs(#pos(@x)) → #pos(@x)
#abs(#s(@x)) → #pos(#s(@x))
#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
appendD(@l, @ys) → appendD#1(@l, @ys)
appendD#1(::(@x, @xs), @ys) → ::(@x, appendD(@xs, @ys))
appendD#1(nil, @ys) → @ys
quicksort(@l) → quicksort#1(@l)
quicksort#1(::(@z, @zs)) → quicksort#2(split(@z, @zs), @z)
quicksort#1(nil) → nil
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys)))
quicksortD(@l) → quicksortD#1(@l)
quicksortD#1(::(@z, @zs)) → quicksortD#2(splitD(@z, @zs), @z)
quicksortD#1(nil) → nil
quicksortD#2(tuple#2(@xs, @ys), @z) → appendD(quicksortD(@xs), ::(@z, quicksortD(@ys)))
split(@pivot, @l) → split#1(@l, @pivot)
split#1(::(@x, @xs), @pivot) → split#2(split(@pivot, @xs), @pivot, @x)
split#1(nil, @pivot) → tuple#2(nil, nil)
split#2(tuple#2(@ls, @rs), @pivot, @x) → split#3(#greater(@x, @pivot), @ls, @rs, @x)
split#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs)
split#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs))
splitD(@pivot, @l) → splitD#1(@l, @pivot)
splitD#1(::(@x, @xs), @pivot) → splitD#2(splitD(@pivot, @xs), @pivot, @x)
splitD#1(nil, @pivot) → tuple#2(nil, nil)
splitD#2(tuple#2(@ls, @rs), @pivot, @x) → splitD#3(#greater(@x, @pivot), @ls, @rs, @x)
splitD#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs)
splitD#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs))
testList(@x) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil))))))))))
testQuicksort(@x) → quicksort(testList(#unit))
testQuicksort2(@x) → quicksort(testList(#unit))

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

#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)

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^2).


The TRS R consists of the following rules:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [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]
appendD(@l, @ys) → appendD#1(@l, @ys) [1]
appendD#1(::(@x, @xs), @ys) → ::(@x, appendD(@xs, @ys)) [1]
appendD#1(nil, @ys) → @ys [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(split(@z, @zs), @z) [1]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys))) [1]
quicksortD(@l) → quicksortD#1(@l) [1]
quicksortD#1(::(@z, @zs)) → quicksortD#2(splitD(@z, @zs), @z) [1]
quicksortD#1(nil) → nil [1]
quicksortD#2(tuple#2(@xs, @ys), @z) → appendD(quicksortD(@xs), ::(@z, quicksortD(@ys))) [1]
split(@pivot, @l) → split#1(@l, @pivot) [1]
split#1(::(@x, @xs), @pivot) → split#2(split(@pivot, @xs), @pivot, @x) [1]
split#1(nil, @pivot) → tuple#2(nil, nil) [1]
split#2(tuple#2(@ls, @rs), @pivot, @x) → split#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
split#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
split#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
splitD(@pivot, @l) → splitD#1(@l, @pivot) [1]
splitD#1(::(@x, @xs), @pivot) → splitD#2(splitD(@pivot, @xs), @pivot, @x) [1]
splitD#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitD#2(tuple#2(@ls, @rs), @pivot, @x) → splitD#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
splitD#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitD#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
testList(@x) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil)))))))))) [1]
testQuicksort(@x) → quicksort(testList(#unit)) [1]
testQuicksort2(@x) → quicksort(testList(#unit)) [1]
#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]

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:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [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]
appendD(@l, @ys) → appendD#1(@l, @ys) [1]
appendD#1(::(@x, @xs), @ys) → ::(@x, appendD(@xs, @ys)) [1]
appendD#1(nil, @ys) → @ys [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(split(@z, @zs), @z) [1]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys))) [1]
quicksortD(@l) → quicksortD#1(@l) [1]
quicksortD#1(::(@z, @zs)) → quicksortD#2(splitD(@z, @zs), @z) [1]
quicksortD#1(nil) → nil [1]
quicksortD#2(tuple#2(@xs, @ys), @z) → appendD(quicksortD(@xs), ::(@z, quicksortD(@ys))) [1]
split(@pivot, @l) → split#1(@l, @pivot) [1]
split#1(::(@x, @xs), @pivot) → split#2(split(@pivot, @xs), @pivot, @x) [1]
split#1(nil, @pivot) → tuple#2(nil, nil) [1]
split#2(tuple#2(@ls, @rs), @pivot, @x) → split#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
split#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
split#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
splitD(@pivot, @l) → splitD#1(@l, @pivot) [1]
splitD#1(::(@x, @xs), @pivot) → splitD#2(splitD(@pivot, @xs), @pivot, @x) [1]
splitD#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitD#2(tuple#2(@ls, @rs), @pivot, @x) → splitD#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
splitD#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitD#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
testList(@x) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil)))))))))) [1]
testQuicksort(@x) → quicksort(testList(#unit)) [1]
testQuicksort2(@x) → quicksort(testList(#unit)) [1]
#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]

The TRS has the following type information:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#greater :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true
#ckgt :: #EQ:#GT:#LT → #false:#true
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT
append :: :::nil → :::nil → :::nil
append#1 :: :::nil → :::nil → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
appendD :: :::nil → :::nil → :::nil
appendD#1 :: :::nil → :::nil → :::nil
quicksort :: :::nil → :::nil
quicksort#1 :: :::nil → :::nil
quicksort#2 :: tuple#2 → #0:#neg:#pos:#s → :::nil
split :: #0:#neg:#pos:#s → :::nil → tuple#2
tuple#2 :: :::nil → :::nil → tuple#2
quicksortD :: :::nil → :::nil
quicksortD#1 :: :::nil → :::nil
quicksortD#2 :: tuple#2 → #0:#neg:#pos:#s → :::nil
splitD :: #0:#neg:#pos:#s → :::nil → tuple#2
split#1 :: :::nil → #0:#neg:#pos:#s → tuple#2
split#2 :: tuple#2 → #0:#neg:#pos:#s → #0:#neg:#pos:#s → tuple#2
split#3 :: #false:#true → :::nil → :::nil → #0:#neg:#pos:#s → tuple#2
#false :: #false:#true
#true :: #false:#true
splitD#1 :: :::nil → #0:#neg:#pos:#s → tuple#2
splitD#2 :: tuple#2 → #0:#neg:#pos:#s → #0:#neg:#pos:#s → tuple#2
splitD#3 :: #false:#true → :::nil → :::nil → #0:#neg:#pos:#s → tuple#2
testList :: #unit → :::nil
testQuicksort :: a → :::nil
#unit :: #unit
testQuicksort2 :: b → :::nil
#EQ :: #EQ:#GT:#LT
#GT :: #EQ:#GT:#LT
#LT :: #EQ:#GT:#LT

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:


testQuicksort
testQuicksort2

(c) The following functions are completely defined:

testList
quicksort
splitD
quicksortD
#greater
split
split#1
#abs
quicksortD#1
splitD#1
split#2
quicksort#1
quicksortD#2
appendD
quicksort#2
splitD#2
appendD#1
split#3
append
splitD#3
append#1
#ckgt
#compare

Due to the following rules being added:

#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
split#2(v0, v1, v2) → const [0]
quicksortD#2(v0, v1) → nil [0]
quicksort#2(v0, v1) → nil [0]
splitD#2(v0, v1, v2) → const [0]
split#3(v0, v1, v2, v3) → const [0]
splitD#3(v0, v1, v2, v3) → const [0]

And the following fresh constants:

null_#ckgt, null_#compare, const, const1, const2

(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:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [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]
appendD(@l, @ys) → appendD#1(@l, @ys) [1]
appendD#1(::(@x, @xs), @ys) → ::(@x, appendD(@xs, @ys)) [1]
appendD#1(nil, @ys) → @ys [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(split(@z, @zs), @z) [1]
quicksort#1(nil) → nil [1]
quicksort#2(tuple#2(@xs, @ys), @z) → append(quicksort(@xs), ::(@z, quicksort(@ys))) [1]
quicksortD(@l) → quicksortD#1(@l) [1]
quicksortD#1(::(@z, @zs)) → quicksortD#2(splitD(@z, @zs), @z) [1]
quicksortD#1(nil) → nil [1]
quicksortD#2(tuple#2(@xs, @ys), @z) → appendD(quicksortD(@xs), ::(@z, quicksortD(@ys))) [1]
split(@pivot, @l) → split#1(@l, @pivot) [1]
split#1(::(@x, @xs), @pivot) → split#2(split(@pivot, @xs), @pivot, @x) [1]
split#1(nil, @pivot) → tuple#2(nil, nil) [1]
split#2(tuple#2(@ls, @rs), @pivot, @x) → split#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
split#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
split#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
splitD(@pivot, @l) → splitD#1(@l, @pivot) [1]
splitD#1(::(@x, @xs), @pivot) → splitD#2(splitD(@pivot, @xs), @pivot, @x) [1]
splitD#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitD#2(tuple#2(@ls, @rs), @pivot, @x) → splitD#3(#greater(@x, @pivot), @ls, @rs, @x) [1]
splitD#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitD#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
testList(@x) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil)))))))))) [1]
testQuicksort(@x) → quicksort(testList(#unit)) [1]
testQuicksort2(@x) → quicksort(testList(#unit)) [1]
#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]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
split#2(v0, v1, v2) → const [0]
quicksortD#2(v0, v1) → nil [0]
quicksort#2(v0, v1) → nil [0]
splitD#2(v0, v1, v2) → const [0]
split#3(v0, v1, v2, v3) → const [0]
splitD#3(v0, v1, v2, v3) → const [0]

The TRS has the following type information:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#greater :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true:null_#ckgt
#ckgt :: #EQ:#GT:#LT:null_#compare → #false:#true:null_#ckgt
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT:null_#compare
append :: :::nil → :::nil → :::nil
append#1 :: :::nil → :::nil → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
appendD :: :::nil → :::nil → :::nil
appendD#1 :: :::nil → :::nil → :::nil
quicksort :: :::nil → :::nil
quicksort#1 :: :::nil → :::nil
quicksort#2 :: tuple#2:const → #0:#neg:#pos:#s → :::nil
split :: #0:#neg:#pos:#s → :::nil → tuple#2:const
tuple#2 :: :::nil → :::nil → tuple#2:const
quicksortD :: :::nil → :::nil
quicksortD#1 :: :::nil → :::nil
quicksortD#2 :: tuple#2:const → #0:#neg:#pos:#s → :::nil
splitD :: #0:#neg:#pos:#s → :::nil → tuple#2:const
split#1 :: :::nil → #0:#neg:#pos:#s → tuple#2:const
split#2 :: tuple#2:const → #0:#neg:#pos:#s → #0:#neg:#pos:#s → tuple#2:const
split#3 :: #false:#true:null_#ckgt → :::nil → :::nil → #0:#neg:#pos:#s → tuple#2:const
#false :: #false:#true:null_#ckgt
#true :: #false:#true:null_#ckgt
splitD#1 :: :::nil → #0:#neg:#pos:#s → tuple#2:const
splitD#2 :: tuple#2:const → #0:#neg:#pos:#s → #0:#neg:#pos:#s → tuple#2:const
splitD#3 :: #false:#true:null_#ckgt → :::nil → :::nil → #0:#neg:#pos:#s → tuple#2:const
testList :: #unit → :::nil
testQuicksort :: a → :::nil
#unit :: #unit
testQuicksort2 :: b → :::nil
#EQ :: #EQ:#GT:#LT:null_#compare
#GT :: #EQ:#GT:#LT:null_#compare
#LT :: #EQ:#GT:#LT:null_#compare
null_#ckgt :: #false:#true:null_#ckgt
null_#compare :: #EQ:#GT:#LT:null_#compare
const :: tuple#2:const
const1 :: a
const2 :: b

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:

#abs(#0) → #0 [1]
#abs(#neg(@x)) → #pos(@x) [1]
#abs(#pos(@x)) → #pos(@x) [1]
#abs(#s(@x)) → #pos(#s(@x)) [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]
appendD(@l, @ys) → appendD#1(@l, @ys) [1]
appendD#1(::(@x, @xs), @ys) → ::(@x, appendD(@xs, @ys)) [1]
appendD#1(nil, @ys) → @ys [1]
quicksort(@l) → quicksort#1(@l) [1]
quicksort#1(::(@z, @zs)) → quicksort#2(split#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]
quicksortD(@l) → quicksortD#1(@l) [1]
quicksortD#1(::(@z, @zs)) → quicksortD#2(splitD#1(@zs, @z), @z) [2]
quicksortD#1(nil) → nil [1]
quicksortD#2(tuple#2(@xs, @ys), @z) → appendD(quicksortD#1(@xs), ::(@z, quicksortD#1(@ys))) [3]
split(@pivot, @l) → split#1(@l, @pivot) [1]
split#1(::(@x, @xs), @pivot) → split#2(split#1(@xs, @pivot), @pivot, @x) [2]
split#1(nil, @pivot) → tuple#2(nil, nil) [1]
split#2(tuple#2(@ls, @rs), @pivot, @x) → split#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) [2]
split#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
split#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
splitD(@pivot, @l) → splitD#1(@l, @pivot) [1]
splitD#1(::(@x, @xs), @pivot) → splitD#2(splitD#1(@xs, @pivot), @pivot, @x) [2]
splitD#1(nil, @pivot) → tuple#2(nil, nil) [1]
splitD#2(tuple#2(@ls, @rs), @pivot, @x) → splitD#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) [2]
splitD#3(#false, @ls, @rs, @x) → tuple#2(::(@x, @ls), @rs) [1]
splitD#3(#true, @ls, @rs, @x) → tuple#2(@ls, ::(@x, @rs)) [1]
testList(@x) → ::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil)))))))))) [1]
testQuicksort(@x) → quicksort(::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil))))))))))) [2]
testQuicksort2(@x) → quicksort(::(#abs(#0), ::(#abs(#pos(#s(#s(#s(#s(#0)))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#0))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#s(#0))))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#0))))))))), ::(#abs(#pos(#s(#0))), ::(#abs(#pos(#s(#s(#0)))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#s(#s(#0)))))))))), ::(#abs(#pos(#s(#s(#s(#s(#s(#s(#0)))))))), ::(#abs(#pos(#s(#s(#s(#0))))), nil))))))))))) [2]
#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]
#ckgt(v0) → null_#ckgt [0]
#compare(v0, v1) → null_#compare [0]
split#2(v0, v1, v2) → const [0]
quicksortD#2(v0, v1) → nil [0]
quicksort#2(v0, v1) → nil [0]
splitD#2(v0, v1, v2) → const [0]
split#3(v0, v1, v2, v3) → const [0]
splitD#3(v0, v1, v2, v3) → const [0]

The TRS has the following type information:
#abs :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#0 :: #0:#neg:#pos:#s
#neg :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#pos :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#s :: #0:#neg:#pos:#s → #0:#neg:#pos:#s
#greater :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #false:#true:null_#ckgt
#ckgt :: #EQ:#GT:#LT:null_#compare → #false:#true:null_#ckgt
#compare :: #0:#neg:#pos:#s → #0:#neg:#pos:#s → #EQ:#GT:#LT:null_#compare
append :: :::nil → :::nil → :::nil
append#1 :: :::nil → :::nil → :::nil
:: :: #0:#neg:#pos:#s → :::nil → :::nil
nil :: :::nil
appendD :: :::nil → :::nil → :::nil
appendD#1 :: :::nil → :::nil → :::nil
quicksort :: :::nil → :::nil
quicksort#1 :: :::nil → :::nil
quicksort#2 :: tuple#2:const → #0:#neg:#pos:#s → :::nil
split :: #0:#neg:#pos:#s → :::nil → tuple#2:const
tuple#2 :: :::nil → :::nil → tuple#2:const
quicksortD :: :::nil → :::nil
quicksortD#1 :: :::nil → :::nil
quicksortD#2 :: tuple#2:const → #0:#neg:#pos:#s → :::nil
splitD :: #0:#neg:#pos:#s → :::nil → tuple#2:const
split#1 :: :::nil → #0:#neg:#pos:#s → tuple#2:const
split#2 :: tuple#2:const → #0:#neg:#pos:#s → #0:#neg:#pos:#s → tuple#2:const
split#3 :: #false:#true:null_#ckgt → :::nil → :::nil → #0:#neg:#pos:#s → tuple#2:const
#false :: #false:#true:null_#ckgt
#true :: #false:#true:null_#ckgt
splitD#1 :: :::nil → #0:#neg:#pos:#s → tuple#2:const
splitD#2 :: tuple#2:const → #0:#neg:#pos:#s → #0:#neg:#pos:#s → tuple#2:const
splitD#3 :: #false:#true:null_#ckgt → :::nil → :::nil → #0:#neg:#pos:#s → tuple#2:const
testList :: #unit → :::nil
testQuicksort :: a → :::nil
#unit :: #unit
testQuicksort2 :: b → :::nil
#EQ :: #EQ:#GT:#LT:null_#compare
#GT :: #EQ:#GT:#LT:null_#compare
#LT :: #EQ:#GT:#LT:null_#compare
null_#ckgt :: #false:#true:null_#ckgt
null_#compare :: #EQ:#GT:#LT:null_#compare
const :: tuple#2:const
const1 :: a
const2 :: b

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:

#0 => 0
nil => 0
#false => 1
#true => 2
#unit => 0
#EQ => 1
#GT => 2
#LT => 3
null_#ckgt => 0
null_#compare => 0
const => 0
const1 => 0
const2 => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + @x :|: @x >= 0, z = 1 + @x
#abs(z) -{ 1 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + @x
#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
#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 = 0, @ys >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, @ys) :|: z' = @ys, @x >= 0, z = 1 + @x + @xs, @xs >= 0, @ys >= 0
appendD(z, z') -{ 1 }→ appendD#1(@l, @ys) :|: z = @l, @l >= 0, z' = @ys, @ys >= 0
appendD#1(z, z') -{ 1 }→ @ys :|: z' = @ys, z = 0, @ys >= 0
appendD#1(z, z') -{ 1 }→ 1 + @x + appendD(@xs, @ys) :|: z' = @ys, @x >= 0, z = 1 + @x + @xs, @xs >= 0, @ys >= 0
quicksort(z) -{ 1 }→ quicksort#1(@l) :|: z = @l, @l >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
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
quicksortD(z) -{ 1 }→ quicksortD#1(@l) :|: z = @l, @l >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + @z + quicksortD#1(@ys)) :|: z' = @z, z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, @z >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
split(z, z') -{ 1 }→ split#1(@l, @pivot) :|: @l >= 0, z = @pivot, z' = @l, @pivot >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, @pivot), @pivot, @x) :|: @x >= 0, z = 1 + @x + @xs, z' = @pivot, @xs >= 0, @pivot >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' = @pivot, @pivot >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) :|: @ls >= 0, z = 1 + @ls + @rs, @x >= 0, z' = @pivot, @pivot >= 0, z'' = @x, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
split#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
split#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
splitD(z, z') -{ 1 }→ splitD#1(@l, @pivot) :|: @l >= 0, z = @pivot, z' = @l, @pivot >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, @pivot), @pivot, @x) :|: @x >= 0, z = 1 + @x + @xs, z' = @pivot, @xs >= 0, @pivot >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' = @pivot, @pivot >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) :|: @ls >= 0, z = 1 + @ls + @rs, @x >= 0, z' = @pivot, @pivot >= 0, z'' = @x, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
splitD#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
splitD#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
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z = @x, @x >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z = @x, @x >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z = @x, @x >= 0

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

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

split#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
split#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
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
splitD#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
splitD#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
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
#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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + @x :|: @x >= 0, z = 1 + @x
#abs(z) -{ 1 }→ 1 + (1 + @x) :|: @x >= 0, z = 1 + @x
#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
#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 = 0, @ys >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, @ys) :|: z' = @ys, @x >= 0, z = 1 + @x + @xs, @xs >= 0, @ys >= 0
appendD(z, z') -{ 1 }→ appendD#1(@l, @ys) :|: z = @l, @l >= 0, z' = @ys, @ys >= 0
appendD#1(z, z') -{ 1 }→ @ys :|: z' = @ys, z = 0, @ys >= 0
appendD#1(z, z') -{ 1 }→ 1 + @x + appendD(@xs, @ys) :|: z' = @ys, @x >= 0, z = 1 + @x + @xs, @xs >= 0, @ys >= 0
quicksort(z) -{ 1 }→ quicksort#1(@l) :|: z = @l, @l >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
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
quicksortD(z) -{ 1 }→ quicksortD#1(@l) :|: z = @l, @l >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + @z + quicksortD#1(@ys)) :|: z' = @z, z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, @z >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
split(z, z') -{ 1 }→ split#1(@l, @pivot) :|: @l >= 0, z = @pivot, z' = @l, @pivot >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, @pivot), @pivot, @x) :|: @x >= 0, z = 1 + @x + @xs, z' = @pivot, @xs >= 0, @pivot >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' = @pivot, @pivot >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) :|: @ls >= 0, z = 1 + @ls + @rs, @x >= 0, z' = @pivot, @pivot >= 0, z'' = @x, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
split#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
split#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
splitD(z, z') -{ 1 }→ splitD#1(@l, @pivot) :|: @l >= 0, z = @pivot, z' = @l, @pivot >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, @pivot), @pivot, @x) :|: @x >= 0, z = 1 + @x + @xs, z' = @pivot, @xs >= 0, @pivot >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' = @pivot, @pivot >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(@x, @pivot)), @ls, @rs, @x) :|: @ls >= 0, z = 1 + @ls + @rs, @x >= 0, z' = @pivot, @pivot >= 0, z'' = @x, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z1 = v3, v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0, v3 >= 0
splitD#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
splitD#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
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z = @x, @x >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z = @x, @x >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z = @x, @x >= 0

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 1 }→ appendD#1(z, z') :|: z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 1 }→ 1 + @x + appendD(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

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

Found the following analysis order by SCC decomposition:

{ appendD, appendD#1 }
{ split#3 }
{ splitD#3 }
{ #compare }
{ #ckgt }
{ append#1, append }
{ #abs }
{ split#2 }
{ splitD#2 }
{ #greater }
{ testList }
{ split#1 }
{ splitD#1 }
{ split }
{ quicksort#1, quicksort#2 }
{ quicksortD#2, quicksortD#1 }
{ splitD }
{ quicksort }
{ quicksortD }
{ testQuicksort2 }
{ testQuicksort }

(16) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 1 }→ appendD#1(z, z') :|: z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 1 }→ 1 + @x + appendD(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {appendD,appendD#1}, {split#3}, {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}

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


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

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

(18) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 1 }→ appendD#1(z, z') :|: z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 1 }→ 1 + @x + appendD(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {appendD,appendD#1}, {split#3}, {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: ?, size: O(n1) [z + z']
appendD#1: runtime: ?, size: O(n1) [z + z']

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


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

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

(20) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 1 }→ appendD#1(z, z') :|: z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 1 }→ 1 + @x + appendD(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {split#3}, {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {split#3}, {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']

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


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

(24) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {split#3}, {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: ?, size: O(n1) [2 + z' + z'' + z1]

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


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

(26) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]

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


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

(30) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {splitD#3}, {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: ?, size: O(n1) [2 + z' + z'' + z1]

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


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

(32) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]

(35) 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

(36) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#compare}, {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: ?, size: O(1) [3]

(37) 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

(38) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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
#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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(#compare(z'', z')), @ls, @rs, z'') :|: @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#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(s2) :|: s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s3) :|: s3 >= 0, s3 <= 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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(s4), @ls, @rs, z'') :|: s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(s5), @ls, @rs, z'') :|: s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]

(41) 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

(42) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#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(s2) :|: s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s3) :|: s3 >= 0, s3 <= 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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(s4), @ls, @rs, z'') :|: s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(s5), @ls, @rs, z'') :|: s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#ckgt}, {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: ?, size: O(1) [2]

(43) 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

(44) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#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(s2) :|: s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ #ckgt(s3) :|: s3 >= 0, s3 <= 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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 2 }→ split#3(#ckgt(s4), @ls, @rs, z'') :|: s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 2 }→ splitD#3(#ckgt(s5), @ls, @rs, z'') :|: s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]

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


Computed SIZE bound using CoFloCo 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'

(48) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {append#1,append}, {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
append#1: runtime: ?, size: O(n1) [z + z']
append: runtime: ?, size: O(n1) [z + z']

(49) 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

(50) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 = 0, z' >= 0
append#1(z, z') -{ 1 }→ 1 + @x + append(@xs, z') :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']

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


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

(54) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {#abs}, {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: ?, size: O(n1) [1 + z]

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


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

(56) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 1 }→ 1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0))))))))) :|: z >= 0
testQuicksort(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0
testQuicksort2(z) -{ 2 }→ quicksort(1 + #abs(0) + (1 + #abs(1 + (1 + (1 + (1 + (1 + 0))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + (1 + #abs(1 + (1 + 0)) + (1 + #abs(1 + (1 + (1 + 0))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + (1 + #abs(1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + (1 + #abs(1 + (1 + (1 + (1 + 0)))) + 0)))))))))) :|: z >= 0

Function symbols to be analyzed: {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]

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


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

(60) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split#2}, {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: ?, size: O(n1) [1 + z + z'']

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


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

(62) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']

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


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

(66) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD#2}, {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: ?, size: O(n1) [1 + z + z'']

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


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

(68) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']

(71) 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

(72) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {#greater}, {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: ?, size: O(1) [2]

(73) 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

(74) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]

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


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

(78) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testList}, {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: ?, size: O(1) [74]

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


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

(80) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]

(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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]

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


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

(84) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split#1}, {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: ?, size: O(n1) [1 + z]

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


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

(86) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 2 }→ quicksort#2(split#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 1 }→ split#1(z', z) :|: z' >= 0, z >= 0
split#1(z, z') -{ 2 }→ split#2(split#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]

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


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

(90) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD#1}, {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: ?, size: O(n1) [1 + z]

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


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

(92) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 2 }→ quicksortD#2(splitD#1(@zs, @z), @z) :|: z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 1 }→ splitD#1(z', z) :|: z' >= 0, z >= 0
splitD#1(z, z') -{ 2 }→ splitD#2(splitD#1(@xs, z'), z', @x) :|: @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]

(95) 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: 1 + z'

(96) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {split}, {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: ?, size: O(n1) [1 + z']

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


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

(98) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']

(101) 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: z

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

(102) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksort#1,quicksort#2}, {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: ?, size: O(n1) [z]
quicksort#2: runtime: ?, size: O(n1) [z + z']

(103) 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: 5 + 38·z + 35·z2

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

(104) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 1 }→ quicksort#1(z) :|: z >= 0
quicksort#1(z) -{ 3 + 5·@zs }→ quicksort#2(s44, @z) :|: s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 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
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']

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


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

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

(108) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksortD#2,quicksortD#1}, {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: ?, size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: ?, size: O(n1) [1 + 3·z]

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


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

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

(110) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 1 }→ quicksortD#1(z) :|: z >= 0
quicksortD#1(z) -{ 3 + 5·@zs }→ quicksortD#2(s48, @z) :|: s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 3 }→ appendD(quicksortD#1(@xs), 1 + z' + quicksortD#1(@ys)) :|: z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]

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


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

(114) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {splitD}, {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: ?, size: O(n1) [1 + z']

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


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

(116) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + 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:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']

(119) 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: z

(120) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksort}, {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: ?, size: O(n1) [z]

(121) 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: 6 + 38·z + 35·z2

(122) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 12 }→ quicksort(1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))) :|: s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 12 }→ quicksort(1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))) :|: s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]

(123) ResultPropagationProof (UPPER BOUND(ID) transformation)

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

(124) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]

(125) IntTrsBoundProof (UPPER BOUND(ID) transformation)


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

(126) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {quicksortD}, {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: ?, size: O(n1) [1 + 3·z]

(127) IntTrsBoundProof (UPPER BOUND(ID) transformation)


Computed RUNTIME bound using KoAT for: quicksortD
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 115 + 148·z + 44·z2

(128) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]

(129) ResultPropagationProof (UPPER BOUND(ID) transformation)

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

(130) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]

(131) IntTrsBoundProof (UPPER BOUND(ID) transformation)


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

(132) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testQuicksort2}, {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
testQuicksort2: runtime: ?, size: O(1) [74]

(133) IntTrsBoundProof (UPPER BOUND(ID) transformation)


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

(134) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
testQuicksort2: runtime: O(1) [194490], size: O(1) [74]

(135) ResultPropagationProof (UPPER BOUND(ID) transformation)

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

(136) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
testQuicksort2: runtime: O(1) [194490], size: O(1) [74]

(137) IntTrsBoundProof (UPPER BOUND(ID) transformation)


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

(138) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed: {testQuicksort}
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
testQuicksort2: runtime: O(1) [194490], size: O(1) [74]
testQuicksort: runtime: ?, size: O(1) [74]

(139) IntTrsBoundProof (UPPER BOUND(ID) transformation)


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

(140) Obligation:

Complexity RNTS consisting of the following rules:

#abs(z) -{ 1 }→ 0 :|: z = 0
#abs(z) -{ 1 }→ 1 + (z - 1) :|: z - 1 >= 0
#abs(z) -{ 1 }→ 1 + (1 + (z - 1)) :|: z - 1 >= 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 }→ s1 :|: s1 >= 0, s1 <= 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
#greater(z, z') -{ 1 }→ s6 :|: s6 >= 0, s6 <= 2, s2 >= 0, s2 <= 3, z' - 1 >= 0, z - 1 >= 0
#greater(z, z') -{ 1 }→ s7 :|: s7 >= 0, s7 <= 2, s3 >= 0, s3 <= 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 }→ s12 :|: s12 >= 0, s12 <= 1 * z + 1 * z', z >= 0, z' >= 0
append#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
append#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s13 :|: s13 >= 0, s13 <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
appendD(z, z') -{ 2 + 2·z }→ s :|: s >= 0, s <= 1 * z + 1 * z', z >= 0, z' >= 0
appendD#1(z, z') -{ 1 }→ z' :|: z = 0, z' >= 0
appendD#1(z, z') -{ 3 + 2·@xs }→ 1 + @x + s' :|: s' >= 0, s' <= 1 * @xs + 1 * z', @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
quicksort(z) -{ 6 + 38·z + 35·z2 }→ s52 :|: s52 >= 0, s52 <= 1 * z, z >= 0
quicksort#1(z) -{ 18 + 5·@zs + 78·s44 + 70·s442 }→ s53 :|: s53 >= 0, s53 <= 1 * s44 + 1 * @z, s44 >= 0, s44 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksort#1(z) -{ 1 }→ 0 :|: z = 0
quicksort#2(z, z') -{ 15 + 38·@xs + 35·@xs2 + 38·@ys + 35·@ys2 + 2·s54 }→ s56 :|: s54 >= 0, s54 <= 1 * @xs, s55 >= 0, s55 <= 1 * @ys, s56 >= 0, s56 <= 1 * s54 + 1 * (1 + z' + s55), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksort#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
quicksortD(z) -{ 115 + 148·z + 44·z2 }→ s57 :|: s57 >= 0, s57 <= 3 * z + 1, z >= 0
quicksortD#1(z) -{ 14 + 5·@zs + 55·s48 + 44·s482 }→ s58 :|: s58 >= 0, s58 <= 3 * @z + 1 + 3 * s48, s48 >= 0, s48 <= 1 * @zs + 1, z = 1 + @z + @zs, @zs >= 0, @z >= 0
quicksortD#1(z) -{ 1 }→ 0 :|: z = 0
quicksortD#2(z, z') -{ 233 + 148·@xs + 44·@xs2 + 148·@ys + 44·@ys2 + 2·s59 }→ s61 :|: s59 >= 0, s59 <= 3 * @xs + 1, s60 >= 0, s60 <= 3 * @ys + 1, s61 >= 0, s61 <= 1 * s59 + 1 * (1 + z' + s60), z = 1 + @xs + @ys, @xs >= 0, @ys >= 0, z' >= 0
quicksortD#2(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
split(z, z') -{ 2 + 5·z' }→ s45 :|: s45 >= 0, s45 <= 1 * z' + 1, z' >= 0, z >= 0
split#1(z, z') -{ 6 + 5·@xs }→ s47 :|: s46 >= 0, s46 <= 1 * @xs + 1, s47 >= 0, s47 <= 1 * s46 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
split#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
split#2(z, z', z'') -{ 3 }→ s9 :|: s8 >= 0, s8 <= 2, s9 >= 0, s9 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s4 >= 0, s4 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
split#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
split#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
splitD(z, z') -{ 2 + 5·z' }→ s49 :|: s49 >= 0, s49 <= 1 * z' + 1, z' >= 0, z >= 0
splitD#1(z, z') -{ 6 + 5·@xs }→ s51 :|: s50 >= 0, s50 <= 1 * @xs + 1, s51 >= 0, s51 <= 1 * s50 + 1 * @x + 1, @x >= 0, z = 1 + @x + @xs, @xs >= 0, z' >= 0
splitD#1(z, z') -{ 1 }→ 1 + 0 + 0 :|: z' >= 0, z = 0
splitD#2(z, z', z'') -{ 3 }→ s11 :|: s10 >= 0, s10 <= 2, s11 >= 0, s11 <= 1 * @ls + 1 * @rs + 1 * z'' + 2, s5 >= 0, s5 <= 3, @ls >= 0, z = 1 + @ls + @rs, z'' >= 0, z' >= 0, @rs >= 0
splitD#2(z, z', z'') -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 0 }→ 0 :|: z >= 0, z' >= 0, z'' >= 0, z1 >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + z' + (1 + z1 + z'') :|: z = 2, z' >= 0, z1 >= 0, z'' >= 0
splitD#3(z, z', z'', z1) -{ 1 }→ 1 + (1 + z1 + z') + z'' :|: z' >= 0, z1 >= 0, z = 1, z'' >= 0
testList(z) -{ 11 }→ 1 + s14 + (1 + s15 + (1 + s16 + (1 + s17 + (1 + s18 + (1 + s19 + (1 + s20 + (1 + s21 + (1 + s22 + (1 + s23 + 0))))))))) :|: s14 >= 0, s14 <= 1 * 0 + 1, s15 >= 0, s15 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s16 >= 0, s16 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s17 >= 0, s17 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s18 >= 0, s18 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s19 >= 0, s19 <= 1 * (1 + (1 + 0)) + 1, s20 >= 0, s20 <= 1 * (1 + (1 + (1 + 0))) + 1, s21 >= 0, s21 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s22 >= 0, s22 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s23 >= 0, s23 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort(z) -{ 3898 + 738·s24 + 70·s24·s25 + 70·s24·s26 + 70·s24·s27 + 70·s24·s28 + 70·s24·s29 + 70·s24·s30 + 70·s24·s31 + 70·s24·s32 + 70·s24·s33 + 35·s242 + 738·s25 + 70·s25·s26 + 70·s25·s27 + 70·s25·s28 + 70·s25·s29 + 70·s25·s30 + 70·s25·s31 + 70·s25·s32 + 70·s25·s33 + 35·s252 + 738·s26 + 70·s26·s27 + 70·s26·s28 + 70·s26·s29 + 70·s26·s30 + 70·s26·s31 + 70·s26·s32 + 70·s26·s33 + 35·s262 + 738·s27 + 70·s27·s28 + 70·s27·s29 + 70·s27·s30 + 70·s27·s31 + 70·s27·s32 + 70·s27·s33 + 35·s272 + 738·s28 + 70·s28·s29 + 70·s28·s30 + 70·s28·s31 + 70·s28·s32 + 70·s28·s33 + 35·s282 + 738·s29 + 70·s29·s30 + 70·s29·s31 + 70·s29·s32 + 70·s29·s33 + 35·s292 + 738·s30 + 70·s30·s31 + 70·s30·s32 + 70·s30·s33 + 35·s302 + 738·s31 + 70·s31·s32 + 70·s31·s33 + 35·s312 + 738·s32 + 70·s32·s33 + 35·s322 + 738·s33 + 35·s332 }→ s62 :|: s62 >= 0, s62 <= 1 * (1 + s24 + (1 + s25 + (1 + s26 + (1 + s27 + (1 + s28 + (1 + s29 + (1 + s30 + (1 + s31 + (1 + s32 + (1 + s33 + 0)))))))))), s24 >= 0, s24 <= 1 * 0 + 1, s25 >= 0, s25 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s26 >= 0, s26 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s27 >= 0, s27 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s28 >= 0, s28 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s29 >= 0, s29 <= 1 * (1 + (1 + 0)) + 1, s30 >= 0, s30 <= 1 * (1 + (1 + (1 + 0))) + 1, s31 >= 0, s31 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s32 >= 0, s32 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s33 >= 0, s33 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0
testQuicksort2(z) -{ 3898 + 738·s34 + 70·s34·s35 + 70·s34·s36 + 70·s34·s37 + 70·s34·s38 + 70·s34·s39 + 70·s34·s40 + 70·s34·s41 + 70·s34·s42 + 70·s34·s43 + 35·s342 + 738·s35 + 70·s35·s36 + 70·s35·s37 + 70·s35·s38 + 70·s35·s39 + 70·s35·s40 + 70·s35·s41 + 70·s35·s42 + 70·s35·s43 + 35·s352 + 738·s36 + 70·s36·s37 + 70·s36·s38 + 70·s36·s39 + 70·s36·s40 + 70·s36·s41 + 70·s36·s42 + 70·s36·s43 + 35·s362 + 738·s37 + 70·s37·s38 + 70·s37·s39 + 70·s37·s40 + 70·s37·s41 + 70·s37·s42 + 70·s37·s43 + 35·s372 + 738·s38 + 70·s38·s39 + 70·s38·s40 + 70·s38·s41 + 70·s38·s42 + 70·s38·s43 + 35·s382 + 738·s39 + 70·s39·s40 + 70·s39·s41 + 70·s39·s42 + 70·s39·s43 + 35·s392 + 738·s40 + 70·s40·s41 + 70·s40·s42 + 70·s40·s43 + 35·s402 + 738·s41 + 70·s41·s42 + 70·s41·s43 + 35·s412 + 738·s42 + 70·s42·s43 + 35·s422 + 738·s43 + 35·s432 }→ s63 :|: s63 >= 0, s63 <= 1 * (1 + s34 + (1 + s35 + (1 + s36 + (1 + s37 + (1 + s38 + (1 + s39 + (1 + s40 + (1 + s41 + (1 + s42 + (1 + s43 + 0)))))))))), s34 >= 0, s34 <= 1 * 0 + 1, s35 >= 0, s35 <= 1 * (1 + (1 + (1 + (1 + (1 + 0))))) + 1, s36 >= 0, s36 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + 0)))))) + 1, s37 >= 0, s37 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))))) + 1, s38 >= 0, s38 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0)))))))) + 1, s39 >= 0, s39 <= 1 * (1 + (1 + 0)) + 1, s40 >= 0, s40 <= 1 * (1 + (1 + (1 + 0))) + 1, s41 >= 0, s41 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))))) + 1, s42 >= 0, s42 <= 1 * (1 + (1 + (1 + (1 + (1 + (1 + (1 + 0))))))) + 1, s43 >= 0, s43 <= 1 * (1 + (1 + (1 + (1 + 0)))) + 1, z >= 0

Function symbols to be analyzed:
Previous analysis results are:
appendD: runtime: O(n1) [2 + 2·z], size: O(n1) [z + z']
appendD#1: runtime: O(n1) [1 + 2·z], size: O(n1) [z + z']
split#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
splitD#3: runtime: O(1) [1], size: O(n1) [2 + z' + z'' + z1]
#compare: runtime: O(1) [0], size: O(1) [3]
#ckgt: runtime: O(1) [0], size: O(1) [2]
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']
#abs: runtime: O(1) [1], size: O(n1) [1 + z]
split#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
splitD#2: runtime: O(1) [3], size: O(n1) [1 + z + z'']
#greater: runtime: O(1) [1], size: O(1) [2]
testList: runtime: O(1) [11], size: O(1) [74]
split#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
splitD#1: runtime: O(n1) [1 + 5·z], size: O(n1) [1 + z]
split: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort#1: runtime: O(n2) [5 + 38·z + 35·z2], size: O(n1) [z]
quicksort#2: runtime: O(n2) [15 + 78·z + 70·z2], size: O(n1) [z + z']
quicksortD#2: runtime: O(n2) [11 + 55·z + 44·z2], size: O(n1) [1 + 3·z + 3·z']
quicksortD#1: runtime: O(n2) [114 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
splitD: runtime: O(n1) [2 + 5·z'], size: O(n1) [1 + z']
quicksort: runtime: O(n2) [6 + 38·z + 35·z2], size: O(n1) [z]
quicksortD: runtime: O(n2) [115 + 148·z + 44·z2], size: O(n1) [1 + 3·z]
testQuicksort2: runtime: O(1) [194490], size: O(1) [74]
testQuicksort: runtime: O(1) [194490], size: O(1) [74]

(141) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(142) BOUNDS(1, n^2)