(0) Obligation:

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


The TRS R consists of the following rules:

minus(0, y) → 0
minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
plus(0, y) → y
plus(s(x), y) → plus(x, s(y))
zero(s(x)) → false
zero(0) → true
p(s(x)) → x
div(x, y) → quot(x, y, 0)
quot(x, y, z) → if(zero(x), x, y, plus(z, s(0)))
if(true, x, y, z) → p(z)
if(false, x, s(y), z) → quot(minus(x, s(y)), s(y), z)

Rewrite Strategy: INNERMOST

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

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

minus(0, y) → 0 [1]
minus(x, 0) → x [1]
minus(s(x), s(y)) → minus(x, y) [1]
plus(0, y) → y [1]
plus(s(x), y) → plus(x, s(y)) [1]
zero(s(x)) → false [1]
zero(0) → true [1]
p(s(x)) → x [1]
div(x, y) → quot(x, y, 0) [1]
quot(x, y, z) → if(zero(x), x, y, plus(z, s(0))) [1]
if(true, x, y, z) → p(z) [1]
if(false, x, s(y), z) → quot(minus(x, s(y)), s(y), z) [1]

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:

minus(0, y) → 0 [1]
minus(x, 0) → x [1]
minus(s(x), s(y)) → minus(x, y) [1]
plus(0, y) → y [1]
plus(s(x), y) → plus(x, s(y)) [1]
zero(s(x)) → false [1]
zero(0) → true [1]
p(s(x)) → x [1]
div(x, y) → quot(x, y, 0) [1]
quot(x, y, z) → if(zero(x), x, y, plus(z, s(0))) [1]
if(true, x, y, z) → p(z) [1]
if(false, x, s(y), z) → quot(minus(x, s(y)), s(y), z) [1]

The TRS has the following type information:
minus :: 0:s → 0:s → 0:s
0 :: 0:s
s :: 0:s → 0:s
plus :: 0:s → 0:s → 0:s
zero :: 0:s → false:true
false :: false:true
true :: false:true
p :: 0:s → 0:s
div :: 0:s → 0:s → 0:s
quot :: 0:s → 0:s → 0:s → 0:s
if :: false:true → 0:s → 0:s → 0:s → 0:s

Rewrite Strategy: INNERMOST

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

The transformation into a RNTS is sound, since:

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

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


p
div
quot
if

(c) The following functions are completely defined:

minus
zero
plus

Due to the following rules being added:
none

And the following fresh constants: none

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

minus(0, y) → 0 [1]
minus(x, 0) → x [1]
minus(s(x), s(y)) → minus(x, y) [1]
plus(0, y) → y [1]
plus(s(x), y) → plus(x, s(y)) [1]
zero(s(x)) → false [1]
zero(0) → true [1]
p(s(x)) → x [1]
div(x, y) → quot(x, y, 0) [1]
quot(x, y, z) → if(zero(x), x, y, plus(z, s(0))) [1]
if(true, x, y, z) → p(z) [1]
if(false, x, s(y), z) → quot(minus(x, s(y)), s(y), z) [1]

The TRS has the following type information:
minus :: 0:s → 0:s → 0:s
0 :: 0:s
s :: 0:s → 0:s
plus :: 0:s → 0:s → 0:s
zero :: 0:s → false:true
false :: false:true
true :: false:true
p :: 0:s → 0:s
div :: 0:s → 0:s → 0:s
quot :: 0:s → 0:s → 0:s → 0:s
if :: false:true → 0:s → 0:s → 0:s → 0:s

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:

minus(0, y) → 0 [1]
minus(x, 0) → x [1]
minus(s(x), s(y)) → minus(x, y) [1]
plus(0, y) → y [1]
plus(s(x), y) → plus(x, s(y)) [1]
zero(s(x)) → false [1]
zero(0) → true [1]
p(s(x)) → x [1]
div(x, y) → quot(x, y, 0) [1]
quot(s(x'), y, 0) → if(false, s(x'), y, s(0)) [3]
quot(s(x'), y, s(x'')) → if(false, s(x'), y, plus(x'', s(s(0)))) [3]
quot(0, y, 0) → if(true, 0, y, s(0)) [3]
quot(0, y, s(x1)) → if(true, 0, y, plus(x1, s(s(0)))) [3]
if(true, x, y, z) → p(z) [1]
if(false, 0, s(y), z) → quot(0, s(y), z) [2]
if(false, s(x2), s(y), z) → quot(minus(x2, y), s(y), z) [2]

The TRS has the following type information:
minus :: 0:s → 0:s → 0:s
0 :: 0:s
s :: 0:s → 0:s
plus :: 0:s → 0:s → 0:s
zero :: 0:s → false:true
false :: false:true
true :: false:true
p :: 0:s → 0:s
div :: 0:s → 0:s → 0:s
quot :: 0:s → 0:s → 0:s → 0:s
if :: false:true → 0:s → 0:s → 0:s → 0:s

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
false => 0
true => 1

(10) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(x, y, 0) :|: z' = x, z'' = y, x >= 0, y >= 0
if(z', z'', z1, z2) -{ 2 }→ quot(minus(x2, y), 1 + y, z) :|: z >= 0, z2 = z, y >= 0, z'' = 1 + x2, z1 = 1 + y, x2 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + y, z) :|: z'' = 0, z >= 0, z2 = z, y >= 0, z1 = 1 + y, z' = 0
if(z', z'', z1, z2) -{ 1 }→ p(z) :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1
minus(z', z'') -{ 1 }→ x :|: z'' = 0, z' = x, x >= 0
minus(z', z'') -{ 1 }→ minus(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
minus(z', z'') -{ 1 }→ 0 :|: z'' = y, y >= 0, z' = 0
p(z') -{ 1 }→ x :|: z' = 1 + x, x >= 0
plus(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(x, 1 + y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, y, plus(x1, 1 + (1 + 0))) :|: x1 >= 0, z'' = y, y >= 0, z1 = 1 + x1, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, y, 1 + 0) :|: z1 = 0, z'' = y, y >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + x', y, plus(x'', 1 + (1 + 0))) :|: z1 = 1 + x'', z' = 1 + x', z'' = y, x' >= 0, y >= 0, x'' >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + x', y, 1 + 0) :|: z1 = 0, z' = 1 + x', z'' = y, x' >= 0, y >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' = 1 + x, x >= 0

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

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

p(z') -{ 1 }→ x :|: z' = 1 + x, x >= 0

(12) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(x, y, 0) :|: z' = x, z'' = y, x >= 0, y >= 0
if(z', z'', z1, z2) -{ 2 }→ x' :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1, z = 1 + x', x' >= 0
if(z', z'', z1, z2) -{ 2 }→ quot(minus(x2, y), 1 + y, z) :|: z >= 0, z2 = z, y >= 0, z'' = 1 + x2, z1 = 1 + y, x2 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + y, z) :|: z'' = 0, z >= 0, z2 = z, y >= 0, z1 = 1 + y, z' = 0
minus(z', z'') -{ 1 }→ x :|: z'' = 0, z' = x, x >= 0
minus(z', z'') -{ 1 }→ minus(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
minus(z', z'') -{ 1 }→ 0 :|: z'' = y, y >= 0, z' = 0
p(z') -{ 1 }→ x :|: z' = 1 + x, x >= 0
plus(z', z'') -{ 1 }→ y :|: z'' = y, y >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(x, 1 + y) :|: z' = 1 + x, z'' = y, x >= 0, y >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, y, plus(x1, 1 + (1 + 0))) :|: x1 >= 0, z'' = y, y >= 0, z1 = 1 + x1, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, y, 1 + 0) :|: z1 = 0, z'' = y, y >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + x', y, plus(x'', 1 + (1 + 0))) :|: z1 = 1 + x'', z' = 1 + x', z'' = y, x' >= 0, y >= 0, x'' >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + x', y, 1 + 0) :|: z1 = 0, z' = 1 + x', z'' = y, x' >= 0, y >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' = 1 + 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:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 }→ quot(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

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

Found the following analysis order by SCC decomposition:

{ minus }
{ zero }
{ plus }
{ p }
{ if, quot }
{ div }

(16) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 }→ quot(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {minus}, {zero}, {plus}, {p}, {if,quot}, {div}

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


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

(18) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 }→ quot(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {minus}, {zero}, {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: ?, size: O(n1) [z']

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


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

(20) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 }→ quot(minus(z'' - 1, z1 - 1), 1 + (z1 - 1), z2) :|: z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ minus(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {zero}, {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [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:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {zero}, {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']

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


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

(24) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {zero}, {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: ?, size: O(1) [1]

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


Computed RUNTIME bound using CoFloCo for: zero
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:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]

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

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]

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


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

(30) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {plus}, {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: ?, size: O(n1) [z' + z'']

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


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

(32) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
plus(z', z'') -{ 1 }→ plus(z' - 1, 1 + z'') :|: z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', plus(z1 - 1, 1 + (1 + 0))) :|: z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', plus(z1 - 1, 1 + (1 + 0))) :|: z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

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

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(1, 0, z'', s2) :|: s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(0, 1 + (z' - 1), z'', s1) :|: s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']

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


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

(36) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(1, 0, z'', s2) :|: s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(0, 1 + (z' - 1), z'', s1) :|: s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {p}, {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: ?, size: O(n1) [z']

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


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

(38) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(1, 0, z'', s2) :|: s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(0, 1 + (z' - 1), z'', s1) :|: s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']

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

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(1, 0, z'', s2) :|: s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(0, 1 + (z' - 1), z'', s1) :|: s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']

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


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

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

(42) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(1, 0, z'', s2) :|: s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(0, 1 + (z' - 1), z'', s1) :|: s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {if,quot}, {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
if: runtime: ?, size: O(n1) [1 + z'' + z2]
quot: runtime: ?, size: O(n1) [2 + z' + z1]

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


Computed RUNTIME bound using CoFloCo for: if
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 15 + 10·z'' + 2·z''·z1 + z''·z2 + z''2 + 3·z1 + 2·z2

Computed RUNTIME bound using PUBS for: quot
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 20 + 11·z' + 2·z'·z'' + z'·z1 + z'2 + 3·z'' + 3·z1

(44) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 1 }→ quot(z', z'', 0) :|: z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 2 + z1 }→ quot(s', 1 + (z1 - 1), z2) :|: s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ quot(0, 1 + (z1 - 1), z2) :|: z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(1, 0, z'', s2) :|: s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 }→ if(1, 0, z'', 1 + 0) :|: z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 3 + z1 }→ if(0, 1 + (z' - 1), z'', s1) :|: s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 3 }→ if(0, 1 + (z' - 1), z'', 1 + 0) :|: z1 = 0, z' - 1 >= 0, z'' >= 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
if: runtime: O(n2) [15 + 10·z'' + 2·z''·z1 + z''·z2 + z''2 + 3·z1 + 2·z2], size: O(n1) [1 + z'' + z2]
quot: runtime: O(n2) [20 + 11·z' + 2·z'·z'' + z'·z1 + z'2 + 3·z'' + 3·z1], size: O(n1) [2 + z' + z1]

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

div(z', z'') -{ 21 + 11·z' + 2·z'·z'' + z'2 + 3·z'' }→ s3 :|: s3 >= 0, s3 <= 1 * z' + 1 * 0 + 2, z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 22 + 3·z1 + 3·z2 }→ s8 :|: s8 >= 0, s8 <= 1 * 0 + 1 * z2 + 2, z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 22 + 11·s' + 2·s'·z1 + s'·z2 + s'2 + 4·z1 + 3·z2 }→ s9 :|: s9 >= 0, s9 <= 1 * s' + 1 * z2 + 2, s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 20 + 11·z' + 2·z'·z'' + z'2 + 3·z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (1 + 0) + 1 + 1 * (1 + (z' - 1)), z1 = 0, z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 18 + 2·s1 + s1·z' + 10·z' + 2·z'·z'' + z'2 + 3·z'' + z1 }→ s5 :|: s5 >= 0, s5 <= 1 * s1 + 1 + 1 * (1 + (z' - 1)), s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 20 + 3·z'' }→ s6 :|: s6 >= 0, s6 <= 1 * (1 + 0) + 1 + 1 * 0, z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 18 + 2·s2 + 3·z'' + z1 }→ s7 :|: s7 >= 0, s7 <= 1 * s2 + 1 + 1 * 0, s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
if: runtime: O(n2) [15 + 10·z'' + 2·z''·z1 + z''·z2 + z''2 + 3·z1 + 2·z2], size: O(n1) [1 + z'' + z2]
quot: runtime: O(n2) [20 + 11·z' + 2·z'·z'' + z'·z1 + z'2 + 3·z'' + 3·z1], size: O(n1) [2 + z' + z1]

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


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

(48) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 21 + 11·z' + 2·z'·z'' + z'2 + 3·z'' }→ s3 :|: s3 >= 0, s3 <= 1 * z' + 1 * 0 + 2, z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 22 + 3·z1 + 3·z2 }→ s8 :|: s8 >= 0, s8 <= 1 * 0 + 1 * z2 + 2, z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 22 + 11·s' + 2·s'·z1 + s'·z2 + s'2 + 4·z1 + 3·z2 }→ s9 :|: s9 >= 0, s9 <= 1 * s' + 1 * z2 + 2, s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 20 + 11·z' + 2·z'·z'' + z'2 + 3·z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (1 + 0) + 1 + 1 * (1 + (z' - 1)), z1 = 0, z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 18 + 2·s1 + s1·z' + 10·z' + 2·z'·z'' + z'2 + 3·z'' + z1 }→ s5 :|: s5 >= 0, s5 <= 1 * s1 + 1 + 1 * (1 + (z' - 1)), s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 20 + 3·z'' }→ s6 :|: s6 >= 0, s6 <= 1 * (1 + 0) + 1 + 1 * 0, z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 18 + 2·s2 + 3·z'' + z1 }→ s7 :|: s7 >= 0, s7 <= 1 * s2 + 1 + 1 * 0, s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed: {div}
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
if: runtime: O(n2) [15 + 10·z'' + 2·z''·z1 + z''·z2 + z''2 + 3·z1 + 2·z2], size: O(n1) [1 + z'' + z2]
quot: runtime: O(n2) [20 + 11·z' + 2·z'·z'' + z'·z1 + z'2 + 3·z'' + 3·z1], size: O(n1) [2 + z' + z1]
div: runtime: ?, size: O(n1) [2 + z']

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


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

(50) Obligation:

Complexity RNTS consisting of the following rules:

div(z', z'') -{ 21 + 11·z' + 2·z'·z'' + z'2 + 3·z'' }→ s3 :|: s3 >= 0, s3 <= 1 * z' + 1 * 0 + 2, z' >= 0, z'' >= 0
if(z', z'', z1, z2) -{ 22 + 3·z1 + 3·z2 }→ s8 :|: s8 >= 0, s8 <= 1 * 0 + 1 * z2 + 2, z'' = 0, z2 >= 0, z1 - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 22 + 11·s' + 2·s'·z1 + s'·z2 + s'2 + 4·z1 + 3·z2 }→ s9 :|: s9 >= 0, s9 <= 1 * s' + 1 * z2 + 2, s' >= 0, s' <= 1 * (z'' - 1), z2 >= 0, z1 - 1 >= 0, z'' - 1 >= 0, z' = 0
if(z', z'', z1, z2) -{ 2 }→ z2 - 1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1, z2 - 1 >= 0
minus(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1 * (z' - 1), z' - 1 >= 0, z'' - 1 >= 0
minus(z', z'') -{ 1 }→ z' :|: z'' = 0, z' >= 0
minus(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0
plus(z', z'') -{ 1 + z' }→ s'' :|: s'' >= 0, s'' <= 1 * (z' - 1) + 1 * (1 + z''), z' - 1 >= 0, z'' >= 0
plus(z', z'') -{ 1 }→ z'' :|: z'' >= 0, z' = 0
quot(z', z'', z1) -{ 20 + 11·z' + 2·z'·z'' + z'2 + 3·z'' }→ s4 :|: s4 >= 0, s4 <= 1 * (1 + 0) + 1 + 1 * (1 + (z' - 1)), z1 = 0, z' - 1 >= 0, z'' >= 0
quot(z', z'', z1) -{ 18 + 2·s1 + s1·z' + 10·z' + 2·z'·z'' + z'2 + 3·z'' + z1 }→ s5 :|: s5 >= 0, s5 <= 1 * s1 + 1 + 1 * (1 + (z' - 1)), s1 >= 0, s1 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z' - 1 >= 0, z'' >= 0, z1 - 1 >= 0
quot(z', z'', z1) -{ 20 + 3·z'' }→ s6 :|: s6 >= 0, s6 <= 1 * (1 + 0) + 1 + 1 * 0, z1 = 0, z'' >= 0, z' = 0
quot(z', z'', z1) -{ 18 + 2·s2 + 3·z'' + z1 }→ s7 :|: s7 >= 0, s7 <= 1 * s2 + 1 + 1 * 0, s2 >= 0, s2 <= 1 * (z1 - 1) + 1 * (1 + (1 + 0)), z1 - 1 >= 0, z'' >= 0, z' = 0
zero(z') -{ 1 }→ 1 :|: z' = 0
zero(z') -{ 1 }→ 0 :|: z' - 1 >= 0

Function symbols to be analyzed:
Previous analysis results are:
minus: runtime: O(n1) [1 + z''], size: O(n1) [z']
zero: runtime: O(1) [1], size: O(1) [1]
plus: runtime: O(n1) [1 + z'], size: O(n1) [z' + z'']
p: runtime: O(1) [1], size: O(n1) [z']
if: runtime: O(n2) [15 + 10·z'' + 2·z''·z1 + z''·z2 + z''2 + 3·z1 + 2·z2], size: O(n1) [1 + z'' + z2]
quot: runtime: O(n2) [20 + 11·z' + 2·z'·z'' + z'·z1 + z'2 + 3·z'' + 3·z1], size: O(n1) [2 + z' + z1]
div: runtime: O(n2) [21 + 11·z' + 2·z'·z'' + z'2 + 3·z''], size: O(n1) [2 + z']

(51) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(52) BOUNDS(1, n^2)