0 CpxTRS
↳1 TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID), 0 ms)
↳2 CpxWeightedTrs
↳3 TypeInferenceProof (BOTH BOUNDS(ID, ID), 2 ms)
↳4 CpxTypedWeightedTrs
↳5 CompletionProof (UPPER BOUND(ID), 0 ms)
↳6 CpxTypedWeightedCompleteTrs
↳7 NarrowingProof (BOTH BOUNDS(ID, ID), 31 ms)
↳8 CpxTypedWeightedCompleteTrs
↳9 CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID), 0 ms)
↳10 CpxRNTS
↳11 SimplificationProof (BOTH BOUNDS(ID, ID), 0 ms)
↳12 CpxRNTS
↳13 CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID), 0 ms)
↳14 CpxRNTS
↳15 IntTrsBoundProof (UPPER BOUND(ID), 168 ms)
↳16 CpxRNTS
↳17 IntTrsBoundProof (UPPER BOUND(ID), 53 ms)
↳18 CpxRNTS
↳19 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳20 CpxRNTS
↳21 IntTrsBoundProof (UPPER BOUND(ID), 387 ms)
↳22 CpxRNTS
↳23 IntTrsBoundProof (UPPER BOUND(ID), 98 ms)
↳24 CpxRNTS
↳25 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳26 CpxRNTS
↳27 IntTrsBoundProof (UPPER BOUND(ID), 269 ms)
↳28 CpxRNTS
↳29 IntTrsBoundProof (UPPER BOUND(ID), 29 ms)
↳30 CpxRNTS
↳31 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳32 CpxRNTS
↳33 IntTrsBoundProof (UPPER BOUND(ID), 139 ms)
↳34 CpxRNTS
↳35 IntTrsBoundProof (UPPER BOUND(ID), 54 ms)
↳36 CpxRNTS
↳37 ResultPropagationProof (UPPER BOUND(ID), 3 ms)
↳38 CpxRNTS
↳39 IntTrsBoundProof (UPPER BOUND(ID), 9001 ms)
↳40 CpxRNTS
↳41 IntTrsBoundProof (UPPER BOUND(ID), 8454 ms)
↳42 CpxRNTS
↳43 FinalProof (⇔, 0 ms)
↳44 BOUNDS(1, n^2)
isLeaf(leaf) → true
isLeaf(cons(u, v)) → false
left(cons(u, v)) → u
right(cons(u, v)) → v
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
less_leaves(u, v) → if1(isLeaf(u), isLeaf(v), u, v)
if1(b, true, u, v) → false
if1(b, false, u, v) → if2(b, u, v)
if2(true, u, v) → true
if2(false, u, v) → less_leaves(concat(left(u), right(u)), concat(left(v), right(v)))
isLeaf(leaf) → true [1]
isLeaf(cons(u, v)) → false [1]
left(cons(u, v)) → u [1]
right(cons(u, v)) → v [1]
concat(leaf, y) → y [1]
concat(cons(u, v), y) → cons(u, concat(v, y)) [1]
less_leaves(u, v) → if1(isLeaf(u), isLeaf(v), u, v) [1]
if1(b, true, u, v) → false [1]
if1(b, false, u, v) → if2(b, u, v) [1]
if2(true, u, v) → true [1]
if2(false, u, v) → less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) [1]
isLeaf(leaf) → true [1]
isLeaf(cons(u, v)) → false [1]
left(cons(u, v)) → u [1]
right(cons(u, v)) → v [1]
concat(leaf, y) → y [1]
concat(cons(u, v), y) → cons(u, concat(v, y)) [1]
less_leaves(u, v) → if1(isLeaf(u), isLeaf(v), u, v) [1]
if1(b, true, u, v) → false [1]
if1(b, false, u, v) → if2(b, u, v) [1]
if2(true, u, v) → true [1]
if2(false, u, v) → less_leaves(concat(left(u), right(u)), concat(left(v), right(v))) [1]
isLeaf :: leaf:cons → true:false leaf :: leaf:cons true :: true:false cons :: leaf:cons → leaf:cons → leaf:cons false :: true:false left :: leaf:cons → leaf:cons right :: leaf:cons → leaf:cons concat :: leaf:cons → leaf:cons → leaf:cons less_leaves :: leaf:cons → leaf:cons → true:false if1 :: true:false → true:false → leaf:cons → leaf:cons → true:false if2 :: true:false → leaf:cons → leaf:cons → true:false |
(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:
less_leaves
if1
if2
isLeaf
concat
left
right
left(v0) → leaf [0]
right(v0) → leaf [0]
Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules:
The TRS has the following type information:
Rewrite Strategy: INNERMOST |
Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules:
The TRS has the following type information:
Rewrite Strategy: INNERMOST |
leaf => 0
true => 1
false => 0
concat(z, z') -{ 1 }→ y :|: y >= 0, z = 0, z' = y
concat(z, z') -{ 1 }→ 1 + u + concat(v, y) :|: z = 1 + u + v, v >= 0, y >= 0, z' = y, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(b, u, v) :|: b >= 0, z1 = v, v >= 0, z = b, z'' = u, z' = 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: b >= 0, z1 = v, v >= 0, z' = 1, z = b, z'' = u, u >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' = v, v >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' = v, v >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: z'' = v, u3 >= 0, v >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, z' = u, v7 >= 0, z = 0, z'' = 1 + u7 + v7, u >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, z' = u, v7 >= 0, z = 0, z'' = 1 + u7 + v7, u >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, z' = u, u11 >= 0, z = 0, z'' = 1 + u11 + v11, u >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' = v, v >= 0, z' = u, z = 0, u >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' = v, v >= 0, z = 1, z' = u, u >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: v0 >= 0, z = v0
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
{ isLeaf } { concat } { right } { left } { if2, less_leaves, if1 } |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: ?, size: O(1) [1] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: ?, size: O(n1) [z + z'] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 1 }→ 1 + u + concat(v, z') :|: z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(concat(u2, v2), concat(u4, v4)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(u4, 0)) :|: v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, v2), concat(0, v8)) :|: v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, v2), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(u2, 0), concat(u5, v5)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(u5, 0)) :|: z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(u2, 0), concat(0, v9)) :|: z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(u2, 0), concat(0, 0)) :|: z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(concat(0, v3), concat(u6, v6)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(u6, 0)) :|: u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, v3), concat(0, v10)) :|: u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, v3), concat(0, 0)) :|: u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(concat(0, 0), concat(u7, v7)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(u7, 0)) :|: u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 2 }→ less_leaves(concat(0, 0), concat(0, v11)) :|: v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 1 }→ less_leaves(concat(0, 0), concat(0, 0)) :|: z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: ?, size: O(n1) [z] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] left: runtime: ?, size: O(n1) [z] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] left: runtime: O(1) [1], size: O(n1) [z] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] left: runtime: O(1) [1], size: O(n1) [z] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] left: runtime: O(1) [1], size: O(n1) [z] if2: runtime: ?, size: O(1) [1] less_leaves: runtime: ?, size: O(1) [1] if1: runtime: ?, size: O(1) [1] |
concat(z, z') -{ 1 }→ z' :|: z' >= 0, z = 0
concat(z, z') -{ 2 + v }→ 1 + u + s :|: s >= 0, s <= 1 * v + 1 * z', z = 1 + u + v, v >= 0, z' >= 0, u >= 0
if1(z, z', z'', z1) -{ 1 }→ if2(z, z'', z1) :|: z >= 0, z1 >= 0, z' = 0, z'' >= 0
if1(z, z', z'', z1) -{ 1 }→ 0 :|: z >= 0, z1 >= 0, z' = 1, z'' >= 0
if2(z, z', z'') -{ 7 + u2 + u4 }→ less_leaves(s', s'') :|: s' >= 0, s' <= 1 * u2 + 1 * v2, s'' >= 0, s'' <= 1 * u4 + 1 * v4, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u4 }→ less_leaves(s1, s2) :|: s1 >= 0, s1 <= 1 * u2 + 1 * v2, s2 >= 0, s2 <= 1 * u4 + 1 * 0, v4 >= 0, z' = 1 + u2 + v2, z'' = 1 + u4 + v4, u2 >= 0, u4 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s11, s12) :|: s11 >= 0, s11 <= 1 * u2 + 1 * 0, s12 >= 0, s12 <= 1 * 0 + 1 * v9, z' = 1 + u2 + v2, z'' = 1 + u9 + v9, u9 >= 0, v9 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 4 + u2 }→ less_leaves(s13, s14) :|: s13 >= 0, s13 <= 1 * u2 + 1 * 0, s14 >= 0, s14 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u6 }→ less_leaves(s15, s16) :|: s15 >= 0, s15 <= 1 * 0 + 1 * v3, s16 >= 0, s16 <= 1 * u6 + 1 * v6, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u6 }→ less_leaves(s17, s18) :|: s17 >= 0, s17 <= 1 * 0 + 1 * v3, s18 >= 0, s18 <= 1 * u6 + 1 * 0, u3 >= 0, z' = 1 + u3 + v3, u6 >= 0, v6 >= 0, z'' = 1 + u6 + v6, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 }→ less_leaves(s19, s20) :|: s19 >= 0, s19 <= 1 * 0 + 1 * v3, s20 >= 0, s20 <= 1 * 0 + 1 * v10, u3 >= 0, z' = 1 + u3 + v3, z'' = 1 + u10 + v10, u10 >= 0, v10 >= 0, z = 0, v3 >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s21, s22) :|: s21 >= 0, s21 <= 1 * 0 + 1 * v3, s22 >= 0, s22 <= 1 * 0 + 1 * 0, u3 >= 0, z'' >= 0, z' = 1 + u3 + v3, z = 0, v3 >= 0
if2(z, z', z'') -{ 5 + u7 }→ less_leaves(s23, s24) :|: s23 >= 0, s23 <= 1 * 0 + 1 * 0, s24 >= 0, s24 <= 1 * u7 + 1 * v7, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 + u7 }→ less_leaves(s25, s26) :|: s25 >= 0, s25 <= 1 * 0 + 1 * 0, s26 >= 0, s26 <= 1 * u7 + 1 * 0, u7 >= 0, v7 >= 0, z = 0, z'' = 1 + u7 + v7, z' >= 0
if2(z, z', z'') -{ 4 }→ less_leaves(s27, s28) :|: s27 >= 0, s27 <= 1 * 0 + 1 * 0, s28 >= 0, s28 <= 1 * 0 + 1 * v11, v11 >= 0, u11 >= 0, z = 0, z'' = 1 + u11 + v11, z' >= 0
if2(z, z', z'') -{ 3 }→ less_leaves(s29, s30) :|: s29 >= 0, s29 <= 1 * 0 + 1 * 0, s30 >= 0, s30 <= 1 * 0 + 1 * 0, z'' >= 0, z = 0, z' >= 0
if2(z, z', z'') -{ 6 + u2 }→ less_leaves(s3, s4) :|: s3 >= 0, s3 <= 1 * u2 + 1 * v2, s4 >= 0, s4 <= 1 * 0 + 1 * v8, v8 >= 0, u8 >= 0, z' = 1 + u2 + v2, z'' = 1 + u8 + v8, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 }→ less_leaves(s5, s6) :|: s5 >= 0, s5 <= 1 * u2 + 1 * v2, s6 >= 0, s6 <= 1 * 0 + 1 * 0, z'' >= 0, z' = 1 + u2 + v2, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 6 + u2 + u5 }→ less_leaves(s7, s8) :|: s7 >= 0, s7 <= 1 * u2 + 1 * 0, s8 >= 0, s8 <= 1 * u5 + 1 * v5, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 5 + u2 + u5 }→ less_leaves(s9, s10) :|: s9 >= 0, s9 <= 1 * u2 + 1 * 0, s10 >= 0, s10 <= 1 * u5 + 1 * 0, z' = 1 + u2 + v2, z'' = 1 + u5 + v5, u5 >= 0, v5 >= 0, u2 >= 0, z = 0, v2 >= 0
if2(z, z', z'') -{ 1 }→ 1 :|: z'' >= 0, z = 1, z' >= 0
isLeaf(z) -{ 1 }→ 1 :|: z = 0
isLeaf(z) -{ 1 }→ 0 :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 1 }→ u :|: z = 1 + u + v, v >= 0, u >= 0
left(z) -{ 0 }→ 0 :|: z >= 0
less_leaves(z, z') -{ 3 }→ if1(1, 1, 0, 0) :|: z = 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(1, 0, 0, 1 + u'' + v'') :|: u'' >= 0, v'' >= 0, z' = 1 + u'' + v'', z = 0
less_leaves(z, z') -{ 3 }→ if1(0, 1, 1 + u' + v', 0) :|: z = 1 + u' + v', u' >= 0, v' >= 0, z' = 0
less_leaves(z, z') -{ 3 }→ if1(0, 0, 1 + u' + v', 1 + u1 + v1) :|: z = 1 + u' + v', z' = 1 + u1 + v1, u' >= 0, v' >= 0, u1 >= 0, v1 >= 0
right(z) -{ 1 }→ v :|: z = 1 + u + v, v >= 0, u >= 0
right(z) -{ 0 }→ 0 :|: z >= 0
isLeaf: runtime: O(1) [1], size: O(1) [1] concat: runtime: O(n1) [1 + z], size: O(n1) [z + z'] right: runtime: O(1) [1], size: O(n1) [z] left: runtime: O(1) [1], size: O(n1) [z] if2: runtime: O(n2) [235 + 238·z' + 16·z'·z'' + 8·z'2 + 238·z'' + 8·z''2], size: O(1) [1] less_leaves: runtime: O(n2) [239 + 238·z + 16·z·z' + 8·z2 + 238·z' + 8·z'2], size: O(1) [1] if1: runtime: O(n2) [236 + 238·z'' + 16·z''·z1 + 8·z''2 + 238·z1 + 8·z12], size: O(1) [1] |