(0) Obligation:

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


The TRS R consists of the following rules:

+(0, y) → y
+(s(x), y) → s(+(x, y))
+(p(x), y) → p(+(x, y))
minus(0) → 0
minus(s(x)) → p(minus(x))
minus(p(x)) → s(minus(x))
*(0, y) → 0
*(s(x), y) → +(*(x, y), y)
*(p(x), y) → +(*(x, y), minus(y))

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


The TRS R consists of the following rules:

+(0, y) → y [1]
+(s(x), y) → s(+(x, y)) [1]
+(p(x), y) → p(+(x, y)) [1]
minus(0) → 0 [1]
minus(s(x)) → p(minus(x)) [1]
minus(p(x)) → s(minus(x)) [1]
*(0, y) → 0 [1]
*(s(x), y) → +(*(x, y), y) [1]
*(p(x), y) → +(*(x, y), minus(y)) [1]

Rewrite Strategy: INNERMOST

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

Renamed defined symbols to avoid conflicts with arithmetic symbols:

+ => plus
* => times

(4) Obligation:

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


The TRS R consists of the following rules:

plus(0, y) → y [1]
plus(s(x), y) → s(plus(x, y)) [1]
plus(p(x), y) → p(plus(x, y)) [1]
minus(0) → 0 [1]
minus(s(x)) → p(minus(x)) [1]
minus(p(x)) → s(minus(x)) [1]
times(0, y) → 0 [1]
times(s(x), y) → plus(times(x, y), y) [1]
times(p(x), y) → plus(times(x, y), minus(y)) [1]

Rewrite Strategy: INNERMOST

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

Infered types.

(6) Obligation:

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

plus(0, y) → y [1]
plus(s(x), y) → s(plus(x, y)) [1]
plus(p(x), y) → p(plus(x, y)) [1]
minus(0) → 0 [1]
minus(s(x)) → p(minus(x)) [1]
minus(p(x)) → s(minus(x)) [1]
times(0, y) → 0 [1]
times(s(x), y) → plus(times(x, y), y) [1]
times(p(x), y) → plus(times(x, y), minus(y)) [1]

The TRS has the following type information:
plus :: 0:s:p → 0:s:p → 0:s:p
0 :: 0:s:p
s :: 0:s:p → 0:s:p
p :: 0:s:p → 0:s:p
minus :: 0:s:p → 0:s:p
times :: 0:s:p → 0:s:p → 0:s:p

Rewrite Strategy: INNERMOST

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

(c) The following functions are completely defined:


times
minus
plus

Due to the following rules being added:
none

And the following fresh constants: none

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

plus(0, y) → y [1]
plus(s(x), y) → s(plus(x, y)) [1]
plus(p(x), y) → p(plus(x, y)) [1]
minus(0) → 0 [1]
minus(s(x)) → p(minus(x)) [1]
minus(p(x)) → s(minus(x)) [1]
times(0, y) → 0 [1]
times(s(x), y) → plus(times(x, y), y) [1]
times(p(x), y) → plus(times(x, y), minus(y)) [1]

The TRS has the following type information:
plus :: 0:s:p → 0:s:p → 0:s:p
0 :: 0:s:p
s :: 0:s:p → 0:s:p
p :: 0:s:p → 0:s:p
minus :: 0:s:p → 0:s:p
times :: 0:s:p → 0:s:p → 0:s:p

Rewrite Strategy: INNERMOST

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

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

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

plus(0, y) → y [1]
plus(s(x), y) → s(plus(x, y)) [1]
plus(p(x), y) → p(plus(x, y)) [1]
minus(0) → 0 [1]
minus(s(x)) → p(minus(x)) [1]
minus(p(x)) → s(minus(x)) [1]
times(0, y) → 0 [1]
times(s(0), y) → plus(0, y) [2]
times(s(s(x')), y) → plus(plus(times(x', y), y), y) [2]
times(s(p(x'')), y) → plus(plus(times(x'', y), minus(y)), y) [2]
times(p(0), 0) → plus(0, 0) [3]
times(p(0), s(x3)) → plus(0, p(minus(x3))) [3]
times(p(0), p(x4)) → plus(0, s(minus(x4))) [3]
times(p(s(x1)), 0) → plus(plus(times(x1, 0), 0), 0) [3]
times(p(s(x1)), s(x5)) → plus(plus(times(x1, s(x5)), s(x5)), p(minus(x5))) [3]
times(p(s(x1)), p(x6)) → plus(plus(times(x1, p(x6)), p(x6)), s(minus(x6))) [3]
times(p(p(x2)), 0) → plus(plus(times(x2, 0), minus(0)), 0) [3]
times(p(p(x2)), s(x7)) → plus(plus(times(x2, s(x7)), minus(s(x7))), p(minus(x7))) [3]
times(p(p(x2)), p(x8)) → plus(plus(times(x2, p(x8)), minus(p(x8))), s(minus(x8))) [3]

The TRS has the following type information:
plus :: 0:s:p → 0:s:p → 0:s:p
0 :: 0:s:p
s :: 0:s:p → 0:s:p
p :: 0:s:p → 0:s:p
minus :: 0:s:p → 0:s:p
times :: 0:s:p → 0:s:p → 0:s:p

Rewrite Strategy: INNERMOST

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

(12) Obligation:

Complexity RNTS consisting of the following rules:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 }→ 1 + minus(x) :|: x >= 0, z = 1 + x
plus(z, z') -{ 1 }→ y :|: y >= 0, z = 0, z' = y
plus(z, z') -{ 1 }→ 1 + plus(x, y) :|: x >= 0, y >= 0, z = 1 + x, z' = y
times(z, z') -{ 2 }→ plus(plus(times(x', y), y), y) :|: x' >= 0, y >= 0, z = 1 + (1 + x'), z' = y
times(z, z') -{ 2 }→ plus(plus(times(x'', y), minus(y)), y) :|: y >= 0, x'' >= 0, z = 1 + (1 + x''), z' = y
times(z, z') -{ 3 }→ plus(plus(times(x1, 0), 0), 0) :|: z = 1 + (1 + x1), x1 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(x1, 1 + x5), 1 + x5), 1 + minus(x5)) :|: z = 1 + (1 + x1), x1 >= 0, x5 >= 0, z' = 1 + x5
times(z, z') -{ 3 }→ plus(plus(times(x1, 1 + x6), 1 + x6), 1 + minus(x6)) :|: z' = 1 + x6, z = 1 + (1 + x1), x1 >= 0, x6 >= 0
times(z, z') -{ 3 }→ plus(plus(times(x2, 0), minus(0)), 0) :|: z = 1 + (1 + x2), x2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(x2, 1 + x7), minus(1 + x7)), 1 + minus(x7)) :|: z' = 1 + x7, z = 1 + (1 + x2), x7 >= 0, x2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(x2, 1 + x8), minus(1 + x8)), 1 + minus(x8)) :|: z = 1 + (1 + x2), z' = 1 + x8, x8 >= 0, x2 >= 0
times(z, z') -{ 2 }→ plus(0, y) :|: z = 1 + 0, y >= 0, z' = y
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 }→ plus(0, 1 + minus(x3)) :|: z' = 1 + x3, z = 1 + 0, x3 >= 0
times(z, z') -{ 3 }→ plus(0, 1 + minus(x4)) :|: x4 >= 0, z = 1 + 0, z' = 1 + x4
times(z, z') -{ 1 }→ 0 :|: y >= 0, z = 0, z' = y

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

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 }→ 1 + minus(z - 1) :|: z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), minus(z')), z') :|: z' >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), minus(0)), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), minus(1 + (z' - 1))), 1 + minus(z' - 1)) :|: z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + minus(z' - 1)) :|: z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 }→ plus(0, 1 + minus(z' - 1)) :|: z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

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

Found the following analysis order by SCC decomposition:

{ minus }
{ plus }
{ times }

(16) Obligation:

Complexity RNTS consisting of the following rules:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 }→ 1 + minus(z - 1) :|: z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), minus(z')), z') :|: z' >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), minus(0)), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), minus(1 + (z' - 1))), 1 + minus(z' - 1)) :|: z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + minus(z' - 1)) :|: z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 }→ plus(0, 1 + minus(z' - 1)) :|: z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

Function symbols to be analyzed: {minus}, {plus}, {times}

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


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

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 }→ 1 + minus(z - 1) :|: z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), minus(z')), z') :|: z' >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), minus(0)), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), minus(1 + (z' - 1))), 1 + minus(z' - 1)) :|: z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + minus(z' - 1)) :|: z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 }→ plus(0, 1 + minus(z' - 1)) :|: z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

Function symbols to be analyzed: {minus}, {plus}, {times}
Previous analysis results are:
minus: runtime: ?, size: O(n1) [z]

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


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

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 }→ 1 + minus(z - 1) :|: z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), minus(z')), z') :|: z' >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), minus(0)), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), minus(1 + (z' - 1))), 1 + minus(z' - 1)) :|: z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + minus(z' - 1)) :|: z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 }→ plus(0, 1 + minus(z' - 1)) :|: z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

Function symbols to be analyzed: {plus}, {times}
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:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 + z }→ 1 + s :|: s >= 0, s <= 1 * (z - 1), z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, z'), s'), z') :|: s' >= 0, s' <= 1 * z', z' >= 0, z - 2 >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 4 }→ plus(plus(times(z - 2, 0), s2), 0) :|: s2 >= 0, s2 <= 1 * 0, z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 4 + 2·z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), s3), 1 + s4) :|: s3 >= 0, s3 <= 1 * (1 + (z' - 1)), s4 >= 0, s4 <= 1 * (z' - 1), z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + s1) :|: s1 >= 0, s1 <= 1 * (z' - 1), z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 + z' }→ plus(0, 1 + s'') :|: s'' >= 0, s'' <= 1 * (z' - 1), z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

Function symbols to be analyzed: {plus}, {times}
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: plus
after applying outer abstraction to obtain an ITS,
resulting in: O(n1) with polynomial bound: z + z'

(24) Obligation:

Complexity RNTS consisting of the following rules:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 + z }→ 1 + s :|: s >= 0, s <= 1 * (z - 1), z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, z'), s'), z') :|: s' >= 0, s' <= 1 * z', z' >= 0, z - 2 >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 4 }→ plus(plus(times(z - 2, 0), s2), 0) :|: s2 >= 0, s2 <= 1 * 0, z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 4 + 2·z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), s3), 1 + s4) :|: s3 >= 0, s3 <= 1 * (1 + (z' - 1)), s4 >= 0, s4 <= 1 * (z' - 1), z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + s1) :|: s1 >= 0, s1 <= 1 * (z' - 1), z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 + z' }→ plus(0, 1 + s'') :|: s'' >= 0, s'' <= 1 * (z' - 1), z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

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

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

(26) Obligation:

Complexity RNTS consisting of the following rules:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 + z }→ 1 + s :|: s >= 0, s <= 1 * (z - 1), z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 }→ 1 + plus(z - 1, z') :|: z - 1 >= 0, z' >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, z'), s'), z') :|: s' >= 0, s' <= 1 * z', z' >= 0, z - 2 >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 4 }→ plus(plus(times(z - 2, 0), s2), 0) :|: s2 >= 0, s2 <= 1 * 0, z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 4 + 2·z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), s3), 1 + s4) :|: s3 >= 0, s3 <= 1 * (1 + (z' - 1)), s4 >= 0, s4 <= 1 * (z' - 1), z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + s1) :|: s1 >= 0, s1 <= 1 * (z' - 1), z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 2 }→ plus(0, z') :|: z = 1 + 0, z' >= 0
times(z, z') -{ 3 }→ plus(0, 0) :|: z = 1 + 0, z' = 0
times(z, z') -{ 3 + z' }→ plus(0, 1 + s'') :|: s'' >= 0, s'' <= 1 * (z' - 1), z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

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

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

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 + z }→ 1 + s :|: s >= 0, s <= 1 * (z - 1), z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 + z }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1 * z', z - 1 >= 0, z' >= 0
times(z, z') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * 0 + 1 * z', z = 1 + 0, z' >= 0
times(z, z') -{ 4 }→ s7 :|: s7 >= 0, s7 <= 1 * 0 + 1 * 0, z = 1 + 0, z' = 0
times(z, z') -{ 4 + z' }→ s8 :|: s8 >= 0, s8 <= 1 * 0 + 1 * (1 + s''), s'' >= 0, s'' <= 1 * (z' - 1), z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, z'), s'), z') :|: s' >= 0, s' <= 1 * z', z' >= 0, z - 2 >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 4 }→ plus(plus(times(z - 2, 0), s2), 0) :|: s2 >= 0, s2 <= 1 * 0, z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 4 + 2·z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), s3), 1 + s4) :|: s3 >= 0, s3 <= 1 * (1 + (z' - 1)), s4 >= 0, s4 <= 1 * (z' - 1), z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + s1) :|: s1 >= 0, s1 <= 1 * (z' - 1), z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

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

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


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

(30) Obligation:

Complexity RNTS consisting of the following rules:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 + z }→ 1 + s :|: s >= 0, s <= 1 * (z - 1), z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 + z }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1 * z', z - 1 >= 0, z' >= 0
times(z, z') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * 0 + 1 * z', z = 1 + 0, z' >= 0
times(z, z') -{ 4 }→ s7 :|: s7 >= 0, s7 <= 1 * 0 + 1 * 0, z = 1 + 0, z' = 0
times(z, z') -{ 4 + z' }→ s8 :|: s8 >= 0, s8 <= 1 * 0 + 1 * (1 + s''), s'' >= 0, s'' <= 1 * (z' - 1), z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, z'), s'), z') :|: s' >= 0, s' <= 1 * z', z' >= 0, z - 2 >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 4 }→ plus(plus(times(z - 2, 0), s2), 0) :|: s2 >= 0, s2 <= 1 * 0, z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 4 + 2·z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), s3), 1 + s4) :|: s3 >= 0, s3 <= 1 * (1 + (z' - 1)), s4 >= 0, s4 <= 1 * (z' - 1), z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + s1) :|: s1 >= 0, s1 <= 1 * (z' - 1), z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

Function symbols to be analyzed: {times}
Previous analysis results are:
minus: runtime: O(n1) [1 + z], size: O(n1) [z]
plus: runtime: O(n1) [1 + z], size: O(n1) [z + z']
times: runtime: ?, size: O(n2) [2·z·z' + 3·z']

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


Computed RUNTIME bound using KoAT for: times
after applying outer abstraction to obtain an ITS,
resulting in: O(n3) with polynomial bound: 12 + 31·z + z·z' + 16·z2·z' + z'

(32) Obligation:

Complexity RNTS consisting of the following rules:

minus(z) -{ 1 }→ 0 :|: z = 0
minus(z) -{ 1 + z }→ 1 + s :|: s >= 0, s <= 1 * (z - 1), z - 1 >= 0
plus(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
plus(z, z') -{ 1 + z }→ 1 + s5 :|: s5 >= 0, s5 <= 1 * (z - 1) + 1 * z', z - 1 >= 0, z' >= 0
times(z, z') -{ 3 }→ s6 :|: s6 >= 0, s6 <= 1 * 0 + 1 * z', z = 1 + 0, z' >= 0
times(z, z') -{ 4 }→ s7 :|: s7 >= 0, s7 <= 1 * 0 + 1 * 0, z = 1 + 0, z' = 0
times(z, z') -{ 4 + z' }→ s8 :|: s8 >= 0, s8 <= 1 * 0 + 1 * (1 + s''), s'' >= 0, s'' <= 1 * (z' - 1), z = 1 + 0, z' - 1 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, z'), s'), z') :|: s' >= 0, s' <= 1 * z', z' >= 0, z - 2 >= 0
times(z, z') -{ 2 }→ plus(plus(times(z - 2, z'), z'), z') :|: z - 2 >= 0, z' >= 0
times(z, z') -{ 4 }→ plus(plus(times(z - 2, 0), s2), 0) :|: s2 >= 0, s2 <= 1 * 0, z - 2 >= 0, z' = 0
times(z, z') -{ 3 }→ plus(plus(times(z - 2, 0), 0), 0) :|: z - 2 >= 0, z' = 0
times(z, z') -{ 4 + 2·z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), s3), 1 + s4) :|: s3 >= 0, s3 <= 1 * (1 + (z' - 1)), s4 >= 0, s4 <= 1 * (z' - 1), z' - 1 >= 0, z - 2 >= 0
times(z, z') -{ 3 + z' }→ plus(plus(times(z - 2, 1 + (z' - 1)), 1 + (z' - 1)), 1 + s1) :|: s1 >= 0, s1 <= 1 * (z' - 1), z - 2 >= 0, z' - 1 >= 0
times(z, z') -{ 1 }→ 0 :|: z' >= 0, z = 0

Function symbols to be analyzed:
Previous analysis results are:
minus: runtime: O(n1) [1 + z], size: O(n1) [z]
plus: runtime: O(n1) [1 + z], size: O(n1) [z + z']
times: runtime: O(n3) [12 + 31·z + z·z' + 16·z2·z' + z'], size: O(n2) [2·z·z' + 3·z']

(33) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(34) BOUNDS(1, n^3)