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

cond1(true, x, y, z) → cond2(gr(x, 0), x, y, z)
cond2(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), p(x), y, z)
cond2(false, x, y, z) → cond3(gr(y, 0), x, y, z)
cond3(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, p(y), z)
cond3(false, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, y, z)
gr(0, x) → false
gr(s(x), 0) → true
gr(s(x), s(y)) → gr(x, y)
or(false, false) → false
or(true, x) → true
or(x, true) → true
p(0) → 0
p(s(x)) → x

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:

cond1(true, x, y, z) → cond2(gr(x, 0), x, y, z) [1]
cond2(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), p(x), y, z) [1]
cond2(false, x, y, z) → cond3(gr(y, 0), x, y, z) [1]
cond3(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, p(y), z) [1]
cond3(false, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, y, z) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
or(false, false) → false [1]
or(true, x) → true [1]
or(x, true) → true [1]
p(0) → 0 [1]
p(s(x)) → x [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:

cond1(true, x, y, z) → cond2(gr(x, 0), x, y, z) [1]
cond2(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), p(x), y, z) [1]
cond2(false, x, y, z) → cond3(gr(y, 0), x, y, z) [1]
cond3(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, p(y), z) [1]
cond3(false, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, y, z) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
or(false, false) → false [1]
or(true, x) → true [1]
or(x, true) → true [1]
p(0) → 0 [1]
p(s(x)) → x [1]

The TRS has the following type information:
cond1 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
true :: true:false
cond2 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
gr :: 0:s → 0:s → true:false
0 :: 0:s
or :: true:false → true:false → true:false
p :: 0:s → 0:s
false :: true:false
cond3 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
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:


cond1
cond2
cond3

(c) The following functions are completely defined:

or
gr
p

Due to the following rules being added:
none

And the following fresh constants:

const

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

cond1(true, x, y, z) → cond2(gr(x, 0), x, y, z) [1]
cond2(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), p(x), y, z) [1]
cond2(false, x, y, z) → cond3(gr(y, 0), x, y, z) [1]
cond3(true, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, p(y), z) [1]
cond3(false, x, y, z) → cond1(or(gr(x, z), gr(y, z)), x, y, z) [1]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
or(false, false) → false [1]
or(true, x) → true [1]
or(x, true) → true [1]
p(0) → 0 [1]
p(s(x)) → x [1]

The TRS has the following type information:
cond1 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
true :: true:false
cond2 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
gr :: 0:s → 0:s → true:false
0 :: 0:s
or :: true:false → true:false → true:false
p :: 0:s → 0:s
false :: true:false
cond3 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
s :: 0:s → 0:s
const :: cond1:cond2:cond3

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:

cond1(true, 0, y, z) → cond2(false, 0, y, z) [2]
cond1(true, s(x'), y, z) → cond2(true, s(x'), y, z) [2]
cond2(true, 0, 0, z) → cond1(or(false, false), 0, 0, z) [4]
cond2(true, 0, s(x2), 0) → cond1(or(false, true), 0, s(x2), 0) [4]
cond2(true, 0, s(x3), s(y'')) → cond1(or(false, gr(x3, y'')), 0, s(x3), s(y'')) [4]
cond2(true, s(x''), 0, 0) → cond1(or(true, false), x'', 0, 0) [4]
cond2(true, s(x''), s(x4), 0) → cond1(or(true, true), x'', s(x4), 0) [4]
cond2(true, s(x1), 0, s(y')) → cond1(or(gr(x1, y'), false), x1, 0, s(y')) [4]
cond2(true, s(x1), s(x5), s(y')) → cond1(or(gr(x1, y'), gr(x5, y')), x1, s(x5), s(y')) [4]
cond2(false, x, 0, z) → cond3(false, x, 0, z) [2]
cond2(false, x, s(x6), z) → cond3(true, x, s(x6), z) [2]
cond3(true, 0, 0, z) → cond1(or(false, false), 0, 0, z) [4]
cond3(true, 0, s(x9), 0) → cond1(or(false, true), 0, x9, 0) [4]
cond3(true, 0, s(x10), s(y2)) → cond1(or(false, gr(x10, y2)), 0, x10, s(y2)) [4]
cond3(true, s(x7), 0, 0) → cond1(or(true, false), s(x7), 0, 0) [4]
cond3(true, s(x7), s(x11), 0) → cond1(or(true, true), s(x7), x11, 0) [4]
cond3(true, s(x8), 0, s(y1)) → cond1(or(gr(x8, y1), false), s(x8), 0, s(y1)) [4]
cond3(true, s(x8), s(x12), s(y1)) → cond1(or(gr(x8, y1), gr(x12, y1)), s(x8), x12, s(y1)) [4]
cond3(false, 0, 0, z) → cond1(or(false, false), 0, 0, z) [3]
cond3(false, 0, s(x15), 0) → cond1(or(false, true), 0, s(x15), 0) [3]
cond3(false, 0, s(x16), s(y4)) → cond1(or(false, gr(x16, y4)), 0, s(x16), s(y4)) [3]
cond3(false, s(x13), 0, 0) → cond1(or(true, false), s(x13), 0, 0) [3]
cond3(false, s(x13), s(x17), 0) → cond1(or(true, true), s(x13), s(x17), 0) [3]
cond3(false, s(x14), 0, s(y3)) → cond1(or(gr(x14, y3), false), s(x14), 0, s(y3)) [3]
cond3(false, s(x14), s(x18), s(y3)) → cond1(or(gr(x14, y3), gr(x18, y3)), s(x14), s(x18), s(y3)) [3]
gr(0, x) → false [1]
gr(s(x), 0) → true [1]
gr(s(x), s(y)) → gr(x, y) [1]
or(false, false) → false [1]
or(true, x) → true [1]
or(x, true) → true [1]
p(0) → 0 [1]
p(s(x)) → x [1]

The TRS has the following type information:
cond1 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
true :: true:false
cond2 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
gr :: 0:s → 0:s → true:false
0 :: 0:s
or :: true:false → true:false → true:false
p :: 0:s → 0:s
false :: true:false
cond3 :: true:false → 0:s → 0:s → 0:s → cond1:cond2:cond3
s :: 0:s → 0:s
const :: cond1:cond2:cond3

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:

true => 1
0 => 0
false => 0
const => 0

(10) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + x', y, z) :|: z1 = y, z >= 0, z'' = 1 + x', z2 = z, x' >= 0, y >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, y, z) :|: z'' = 0, z1 = y, z >= 0, z2 = z, y >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, x, 1 + x6, z) :|: z >= 0, z2 = z, x >= 0, x6 >= 0, z'' = x, z1 = 1 + x6, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, x, 0, z) :|: z1 = 0, z >= 0, z2 = z, x >= 0, z'' = x, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x1, y'), gr(x5, y')), x1, 1 + x5, 1 + y') :|: x1 >= 0, x5 >= 0, z'' = 1 + x1, y' >= 0, z2 = 1 + y', z' = 1, z1 = 1 + x5
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x1, y'), 0), x1, 0, 1 + y') :|: z1 = 0, x1 >= 0, z'' = 1 + x1, y' >= 0, z2 = 1 + y', z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(1, 1), x'', 1 + x4, 0) :|: x4 >= 0, z2 = 0, z1 = 1 + x4, z' = 1, z'' = 1 + x'', x'' >= 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(1, 0), x'', 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' = 1 + x'', x'' >= 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(x3, y'')), 0, 1 + x3, 1 + y'') :|: z'' = 0, z2 = 1 + y'', y'' >= 0, z' = 1, z1 = 1 + x3, x3 >= 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, 1), 0, 1 + x2, 0) :|: z'' = 0, z2 = 0, z' = 1, x2 >= 0, z1 = 1 + x2
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, 0), 0, 0, z) :|: z'' = 0, z1 = 0, z >= 0, z2 = z, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(x14, y3), gr(x18, y3)), 1 + x14, 1 + x18, 1 + y3) :|: z1 = 1 + x18, z2 = 1 + y3, y3 >= 0, x14 >= 0, x18 >= 0, z'' = 1 + x14, z' = 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(x14, y3), 0), 1 + x14, 0, 1 + y3) :|: z1 = 0, z2 = 1 + y3, y3 >= 0, x14 >= 0, z'' = 1 + x14, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x8, y1), gr(x12, y1)), 1 + x8, x12, 1 + y1) :|: y1 >= 0, z2 = 1 + y1, x8 >= 0, z1 = 1 + x12, x12 >= 0, z'' = 1 + x8, z' = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x8, y1), 0), 1 + x8, 0, 1 + y1) :|: y1 >= 0, z2 = 1 + y1, z1 = 0, x8 >= 0, z'' = 1 + x8, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(1, 1), 1 + x13, 1 + x17, 0) :|: x13 >= 0, x17 >= 0, z1 = 1 + x17, z2 = 0, z'' = 1 + x13, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(1, 1), 1 + x7, x11, 0) :|: z1 = 1 + x11, x7 >= 0, z2 = 0, z'' = 1 + x7, x11 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(1, 0), 1 + x13, 0, 0) :|: x13 >= 0, z1 = 0, z2 = 0, z'' = 1 + x13, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(1, 0), 1 + x7, 0, 0) :|: z1 = 0, x7 >= 0, z2 = 0, z'' = 1 + x7, z' = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(x10, y2)), 0, x10, 1 + y2) :|: z'' = 0, z2 = 1 + y2, z' = 1, z1 = 1 + x10, x10 >= 0, y2 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(x16, y4)), 0, 1 + x16, 1 + y4) :|: z'' = 0, z1 = 1 + x16, z2 = 1 + y4, y4 >= 0, x16 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, 1), 0, x9, 0) :|: z'' = 0, z2 = 0, z1 = 1 + x9, z' = 1, x9 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, 1), 0, 1 + x15, 0) :|: z'' = 0, z1 = 1 + x15, z2 = 0, x15 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, 0), 0, 0, z) :|: z'' = 0, z1 = 0, z >= 0, z2 = z, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, 0), 0, 0, z) :|: z'' = 0, z1 = 0, z >= 0, z2 = z, z' = 0
gr(z', z'') -{ 1 }→ gr(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 1 + x, x >= 0
gr(z', z'') -{ 1 }→ 0 :|: x >= 0, z'' = x, z' = 0
or(z', z'') -{ 1 }→ 1 :|: x >= 0, z'' = x, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' = x, x >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ x :|: z' = 1 + x, x >= 0
p(z') -{ 1 }→ 0 :|: z' = 0

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

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

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

(12) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + x', y, z) :|: z1 = y, z >= 0, z'' = 1 + x', z2 = z, x' >= 0, y >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, y, z) :|: z'' = 0, z1 = y, z >= 0, z2 = z, y >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, x, 1 + x6, z) :|: z >= 0, z2 = z, x >= 0, x6 >= 0, z'' = x, z1 = 1 + x6, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, x, 0, z) :|: z1 = 0, z >= 0, z2 = z, x >= 0, z'' = x, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x1, y'), gr(x5, y')), x1, 1 + x5, 1 + y') :|: x1 >= 0, x5 >= 0, z'' = 1 + x1, y' >= 0, z2 = 1 + y', z' = 1, z1 = 1 + x5
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x1, y'), 0), x1, 0, 1 + y') :|: z1 = 0, x1 >= 0, z'' = 1 + x1, y' >= 0, z2 = 1 + y', z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(x3, y'')), 0, 1 + x3, 1 + y'') :|: z'' = 0, z2 = 1 + y'', y'' >= 0, z' = 1, z1 = 1 + x3, x3 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, x'', 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' = 1 + x'', x'' >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, x'', 1 + x4, 0) :|: x4 >= 0, z2 = 0, z1 = 1 + x4, z' = 1, z'' = 1 + x'', x'' >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + x2, 0) :|: z'' = 0, z2 = 0, z' = 1, x2 >= 0, z1 = 1 + x2, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z) :|: z'' = 0, z1 = 0, z >= 0, z2 = z, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(x14, y3), gr(x18, y3)), 1 + x14, 1 + x18, 1 + y3) :|: z1 = 1 + x18, z2 = 1 + y3, y3 >= 0, x14 >= 0, x18 >= 0, z'' = 1 + x14, z' = 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(x14, y3), 0), 1 + x14, 0, 1 + y3) :|: z1 = 0, z2 = 1 + y3, y3 >= 0, x14 >= 0, z'' = 1 + x14, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x8, y1), gr(x12, y1)), 1 + x8, x12, 1 + y1) :|: y1 >= 0, z2 = 1 + y1, x8 >= 0, z1 = 1 + x12, x12 >= 0, z'' = 1 + x8, z' = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(x8, y1), 0), 1 + x8, 0, 1 + y1) :|: y1 >= 0, z2 = 1 + y1, z1 = 0, x8 >= 0, z'' = 1 + x8, z' = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(x10, y2)), 0, x10, 1 + y2) :|: z'' = 0, z2 = 1 + y2, z' = 1, z1 = 1 + x10, x10 >= 0, y2 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(x16, y4)), 0, 1 + x16, 1 + y4) :|: z'' = 0, z1 = 1 + x16, z2 = 1 + y4, y4 >= 0, x16 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, x9, 0) :|: z'' = 0, z2 = 0, z1 = 1 + x9, z' = 1, x9 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + x15, 0) :|: z'' = 0, z1 = 1 + x15, z2 = 0, x15 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + x13, 0, 0) :|: x13 >= 0, z1 = 0, z2 = 0, z'' = 1 + x13, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + x13, 1 + x17, 0) :|: x13 >= 0, x17 >= 0, z1 = 1 + x17, z2 = 0, z'' = 1 + x13, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + x7, x11, 0) :|: z1 = 1 + x11, x7 >= 0, z2 = 0, z'' = 1 + x7, x11 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + x7, 0, 0) :|: z1 = 0, x7 >= 0, z2 = 0, z'' = 1 + x7, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z) :|: z'' = 0, z1 = 0, z >= 0, z2 = z, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z) :|: z'' = 0, z1 = 0, z >= 0, z2 = z, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(x, y) :|: z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' = 1 + x, x >= 0
gr(z', z'') -{ 1 }→ 0 :|: x >= 0, z'' = x, z' = 0
or(z', z'') -{ 1 }→ 1 :|: x >= 0, z'' = x, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' = x, x >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ x :|: z' = 1 + x, x >= 0
p(z') -{ 1 }→ 0 :|: z' = 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:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

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

Found the following analysis order by SCC decomposition:

{ p }
{ gr }
{ or }
{ cond1, cond2, cond3 }

(16) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {p}, {gr}, {or}, {cond1,cond2,cond3}

(17) 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'

(18) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {p}, {gr}, {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: ?, size: O(n1) [z']

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

(20) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {gr}, {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], 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:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {gr}, {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']

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


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

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {gr}, {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: ?, size: O(1) [1]

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


Computed RUNTIME bound using PUBS for: gr
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:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), z'' - 1, 0, 1 + (z2 - 1)) :|: z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), gr(z1 - 1, z2 - 1)), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(gr(z'' - 1, z2 - 1), 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, z1 - 1, 1 + (z2 - 1)) :|: z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 }→ cond1(or(0, gr(z1 - 1, z2 - 1)), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 }→ gr(z' - 1, z'' - 1) :|: z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], 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:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(s'', 0), z'' - 1, 0, 1 + (z2 - 1)) :|: s'' >= 0, s'' <= 1, z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(or(s1, s2), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s1 >= 0, s1 <= 1, s2 >= 0, s2 <= 1, z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(0, s'), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s' >= 0, s' <= 1, z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(s4, 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s4 >= 0, s4 <= 1, z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(or(s5, s6), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: s5 >= 0, s5 <= 1, s6 >= 0, s6 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 + z2 }→ cond1(or(s8, 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s8 >= 0, s8 <= 1, z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 3 + 2·z2 }→ cond1(or(s9, s10), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: s9 >= 0, s9 <= 1, s10 >= 0, s10 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(0, s3), 0, z1 - 1, 1 + (z2 - 1)) :|: s3 >= 0, s3 <= 1, z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 + z2 }→ cond1(or(0, s7), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s7 >= 0, s7 <= 1, z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], size: O(1) [1]

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


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

(30) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(s'', 0), z'' - 1, 0, 1 + (z2 - 1)) :|: s'' >= 0, s'' <= 1, z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(or(s1, s2), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s1 >= 0, s1 <= 1, s2 >= 0, s2 <= 1, z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(0, s'), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s' >= 0, s' <= 1, z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(s4, 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s4 >= 0, s4 <= 1, z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(or(s5, s6), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: s5 >= 0, s5 <= 1, s6 >= 0, s6 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 + z2 }→ cond1(or(s8, 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s8 >= 0, s8 <= 1, z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 3 + 2·z2 }→ cond1(or(s9, s10), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: s9 >= 0, s9 <= 1, s10 >= 0, s10 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(0, s3), 0, z1 - 1, 1 + (z2 - 1)) :|: s3 >= 0, s3 <= 1, z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 + z2 }→ cond1(or(0, s7), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s7 >= 0, s7 <= 1, z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {or}, {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], size: O(1) [1]
or: runtime: ?, size: O(1) [1]

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


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

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(s'', 0), z'' - 1, 0, 1 + (z2 - 1)) :|: s'' >= 0, s'' <= 1, z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(or(s1, s2), z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s1 >= 0, s1 <= 1, s2 >= 0, s2 <= 1, z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(0, s'), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s' >= 0, s' <= 1, z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(s4, 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s4 >= 0, s4 <= 1, z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(or(s5, s6), 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: s5 >= 0, s5 <= 1, s6 >= 0, s6 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 3 + z2 }→ cond1(or(s8, 0), 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s8 >= 0, s8 <= 1, z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 3 + 2·z2 }→ cond1(or(s9, s10), 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: s9 >= 0, s9 <= 1, s10 >= 0, s10 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(or(0, s3), 0, z1 - 1, 1 + (z2 - 1)) :|: s3 >= 0, s3 <= 1, z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 3 + z2 }→ cond1(or(0, s7), 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s7 >= 0, s7 <= 1, z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], size: O(1) [1]
or: runtime: O(1) [1], size: O(1) [1]

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

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s11, 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s11 >= 0, s11 <= 1, s' >= 0, s' <= 1, z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s12, z'' - 1, 0, 1 + (z2 - 1)) :|: s12 >= 0, s12 <= 1, s'' >= 0, s'' <= 1, z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 5 + 2·z2 }→ cond1(s13, z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s13 >= 0, s13 <= 1, s1 >= 0, s1 <= 1, s2 >= 0, s2 <= 1, z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s14, 0, z1 - 1, 1 + (z2 - 1)) :|: s14 >= 0, s14 <= 1, s3 >= 0, s3 <= 1, z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s15, 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s15 >= 0, s15 <= 1, s4 >= 0, s4 <= 1, z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 5 + 2·z2 }→ cond1(s16, 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: s16 >= 0, s16 <= 1, s5 >= 0, s5 <= 1, s6 >= 0, s6 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(s17, 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s17 >= 0, s17 <= 1, s7 >= 0, s7 <= 1, z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(s18, 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s18 >= 0, s18 <= 1, s8 >= 0, s8 <= 1, z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(s19, 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: s19 >= 0, s19 <= 1, s9 >= 0, s9 <= 1, s10 >= 0, s10 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], size: O(1) [1]
or: runtime: O(1) [1], size: O(1) [1]

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


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

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

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

(36) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s11, 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s11 >= 0, s11 <= 1, s' >= 0, s' <= 1, z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s12, z'' - 1, 0, 1 + (z2 - 1)) :|: s12 >= 0, s12 <= 1, s'' >= 0, s'' <= 1, z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 5 + 2·z2 }→ cond1(s13, z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s13 >= 0, s13 <= 1, s1 >= 0, s1 <= 1, s2 >= 0, s2 <= 1, z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s14, 0, z1 - 1, 1 + (z2 - 1)) :|: s14 >= 0, s14 <= 1, s3 >= 0, s3 <= 1, z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s15, 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s15 >= 0, s15 <= 1, s4 >= 0, s4 <= 1, z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 5 + 2·z2 }→ cond1(s16, 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: s16 >= 0, s16 <= 1, s5 >= 0, s5 <= 1, s6 >= 0, s6 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(s17, 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s17 >= 0, s17 <= 1, s7 >= 0, s7 <= 1, z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(s18, 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s18 >= 0, s18 <= 1, s8 >= 0, s8 <= 1, z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(s19, 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: s19 >= 0, s19 <= 1, s9 >= 0, s9 <= 1, s10 >= 0, s10 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed: {cond1,cond2,cond3}
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], size: O(1) [1]
or: runtime: O(1) [1], size: O(1) [1]
cond1: runtime: ?, size: O(1) [0]
cond2: runtime: ?, size: O(1) [0]
cond3: runtime: ?, size: O(1) [0]

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


Computed RUNTIME bound using CoFloCo for: cond1
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 13 + 7·z'' + 2·z''·z2 + 9·z1 + z1·z2 + 2·z2

Computed RUNTIME bound using PUBS for: cond2
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 19 + 7·z'' + 2·z''·z2 + 9·z1 + z1·z2 + 4·z2

Computed RUNTIME bound using PUBS for: cond3
after applying outer abstraction to obtain an ITS,
resulting in: O(n2) with polynomial bound: 18 + 7·z'' + 2·z''·z2 + 9·z1 + z1·z2 + 4·z2

(38) Obligation:

Complexity RNTS consisting of the following rules:

cond1(z', z'', z1, z2) -{ 2 }→ cond2(1, 1 + (z'' - 1), z1, z2) :|: z2 >= 0, z'' - 1 >= 0, z1 >= 0, z' = 1
cond1(z', z'', z1, z2) -{ 2 }→ cond2(0, 0, z1, z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 2 }→ cond3(1, z'', 1 + (z1 - 1), z2) :|: z2 >= 0, z'' >= 0, z1 - 1 >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 2 }→ cond3(0, z'', 0, z2) :|: z1 = 0, z2 >= 0, z'' >= 0, z' = 0
cond2(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s11, 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s11 >= 0, s11 <= 1, s' >= 0, s' <= 1, z'' = 0, z2 - 1 >= 0, z' = 1, z1 - 1 >= 0
cond2(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s12, z'' - 1, 0, 1 + (z2 - 1)) :|: s12 >= 0, s12 <= 1, s'' >= 0, s'' <= 1, z1 = 0, z'' - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 5 + 2·z2 }→ cond1(s13, z'' - 1, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s13 >= 0, s13 <= 1, s1 >= 0, s1 <= 1, s2 >= 0, s2 <= 1, z'' - 1 >= 0, z1 - 1 >= 0, z2 - 1 >= 0, z' = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 0, 0) :|: z1 = 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 0 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(1, z'' - 1, 1 + (z1 - 1), 0) :|: z1 - 1 >= 0, z2 = 0, z' = 1, z'' - 1 >= 0, x >= 0, 1 = x, 1 = 1
cond2(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s14, 0, z1 - 1, 1 + (z2 - 1)) :|: s14 >= 0, s14 <= 1, s3 >= 0, s3 <= 1, z'' = 0, z' = 1, z1 - 1 >= 0, z2 - 1 >= 0
cond3(z', z'', z1, z2) -{ 5 + z2 }→ cond1(s15, 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s15 >= 0, s15 <= 1, s4 >= 0, s4 <= 1, z2 - 1 >= 0, z1 = 0, z'' - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 5 + 2·z2 }→ cond1(s16, 1 + (z'' - 1), z1 - 1, 1 + (z2 - 1)) :|: s16 >= 0, s16 <= 1, s5 >= 0, s5 <= 1, s6 >= 0, s6 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 1
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(s17, 0, 1 + (z1 - 1), 1 + (z2 - 1)) :|: s17 >= 0, s17 <= 1, s7 >= 0, s7 <= 1, z'' = 0, z2 - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + z2 }→ cond1(s18, 1 + (z'' - 1), 0, 1 + (z2 - 1)) :|: s18 >= 0, s18 <= 1, s8 >= 0, s8 <= 1, z1 = 0, z2 - 1 >= 0, z'' - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 4 + 2·z2 }→ cond1(s19, 1 + (z'' - 1), 1 + (z1 - 1), 1 + (z2 - 1)) :|: s19 >= 0, s19 <= 1, s9 >= 0, s9 <= 1, s10 >= 0, s10 <= 1, z2 - 1 >= 0, z'' - 1 >= 0, z1 - 1 >= 0, z' = 0
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 0, z1 - 1, 0) :|: z'' = 0, z2 = 0, z' = 1, z1 - 1 >= 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 0, 1 + (z1 - 1), 0) :|: z'' = 0, z2 = 0, z1 - 1 >= 0, z' = 0, 0 = x, x >= 0, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z1 = 0, z'' - 1 >= 0, z2 = 0, z' = 1, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 0, 0) :|: z'' - 1 >= 0, z1 = 0, z2 = 0, z' = 0, x >= 0, 0 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(1, 1 + (z'' - 1), z1 - 1, 0) :|: z'' - 1 >= 0, z2 = 0, z1 - 1 >= 0, z' = 1, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 4 }→ cond1(1, 1 + (z'' - 1), 1 + (z1 - 1), 0) :|: z'' - 1 >= 0, z1 - 1 >= 0, z2 = 0, z' = 0, x >= 0, 1 = x, 1 = 1
cond3(z', z'', z1, z2) -{ 5 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 1, 0 = 0
cond3(z', z'', z1, z2) -{ 4 }→ cond1(0, 0, 0, z2) :|: z'' = 0, z1 = 0, z2 >= 0, z' = 0, 0 = 0
gr(z', z'') -{ 1 + z'' }→ s :|: s >= 0, s <= 1, z' - 1 >= 0, z'' - 1 >= 0
gr(z', z'') -{ 1 }→ 1 :|: z'' = 0, z' - 1 >= 0
gr(z', z'') -{ 1 }→ 0 :|: z'' >= 0, z' = 0
or(z', z'') -{ 1 }→ 1 :|: z'' >= 0, z' = 1
or(z', z'') -{ 1 }→ 1 :|: z' >= 0, z'' = 1
or(z', z'') -{ 1 }→ 0 :|: z'' = 0, z' = 0
p(z') -{ 1 }→ 0 :|: z' = 0
p(z') -{ 1 }→ z' - 1 :|: z' - 1 >= 0

Function symbols to be analyzed:
Previous analysis results are:
p: runtime: O(1) [1], size: O(n1) [z']
gr: runtime: O(n1) [1 + z''], size: O(1) [1]
or: runtime: O(1) [1], size: O(1) [1]
cond1: runtime: O(n2) [13 + 7·z'' + 2·z''·z2 + 9·z1 + z1·z2 + 2·z2], size: O(1) [0]
cond2: runtime: O(n2) [19 + 7·z'' + 2·z''·z2 + 9·z1 + z1·z2 + 4·z2], size: O(1) [0]
cond3: runtime: O(n2) [18 + 7·z'' + 2·z''·z2 + 9·z1 + z1·z2 + 4·z2], size: O(1) [0]

(39) FinalProof (EQUIVALENT transformation)

Computed overall runtime complexity

(40) BOUNDS(1, n^2)