0 CpxTRS
↳1 TrsToWeightedTrsProof (BOTH BOUNDS(ID, ID), 0 ms)
↳2 CpxWeightedTrs
↳3 TypeInferenceProof (BOTH BOUNDS(ID, ID), 0 ms)
↳4 CpxTypedWeightedTrs
↳5 CompletionProof (UPPER BOUND(ID), 0 ms)
↳6 CpxTypedWeightedCompleteTrs
↳7 NarrowingProof (BOTH BOUNDS(ID, ID), 0 ms)
↳8 CpxTypedWeightedCompleteTrs
↳9 CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID), 14 ms)
↳10 CpxRNTS
↳11 InliningProof (UPPER BOUND(ID), 71 ms)
↳12 CpxRNTS
↳13 SimplificationProof (BOTH BOUNDS(ID, ID), 0 ms)
↳14 CpxRNTS
↳15 CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID), 4 ms)
↳16 CpxRNTS
↳17 IntTrsBoundProof (UPPER BOUND(ID), 462 ms)
↳18 CpxRNTS
↳19 IntTrsBoundProof (UPPER BOUND(ID), 144 ms)
↳20 CpxRNTS
↳21 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳22 CpxRNTS
↳23 IntTrsBoundProof (UPPER BOUND(ID), 113 ms)
↳24 CpxRNTS
↳25 IntTrsBoundProof (UPPER BOUND(ID), 8 ms)
↳26 CpxRNTS
↳27 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳28 CpxRNTS
↳29 IntTrsBoundProof (UPPER BOUND(ID), 289 ms)
↳30 CpxRNTS
↳31 IntTrsBoundProof (UPPER BOUND(ID), 6 ms)
↳32 CpxRNTS
↳33 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳34 CpxRNTS
↳35 IntTrsBoundProof (UPPER BOUND(ID), 849 ms)
↳36 CpxRNTS
↳37 IntTrsBoundProof (UPPER BOUND(ID), 163 ms)
↳38 CpxRNTS
↳39 ResultPropagationProof (UPPER BOUND(ID), 0 ms)
↳40 CpxRNTS
↳41 IntTrsBoundProof (UPPER BOUND(ID), 217 ms)
↳42 CpxRNTS
↳43 IntTrsBoundProof (UPPER BOUND(ID), 7 ms)
↳44 CpxRNTS
↳45 FinalProof (⇔, 0 ms)
↳46 BOUNDS(1, n^1)
foldl(x, Cons(S(0), xs)) → foldl(S(x), xs)
foldl(S(0), Cons(x, xs)) → foldl(S(x), xs)
foldr(a, Cons(x, xs)) → op(x, foldr(a, xs))
foldr(a, Nil) → a
foldl(a, Nil) → a
notEmpty(Cons(x, xs)) → True
notEmpty(Nil) → False
op(x, S(0)) → S(x)
op(S(0), y) → S(y)
fold(a, xs) → Cons(foldl(a, xs), Cons(foldr(a, xs), Nil))
foldl(x, Cons(S(0), xs)) → foldl(S(x), xs) [1]
foldl(S(0), Cons(x, xs)) → foldl(S(x), xs) [1]
foldr(a, Cons(x, xs)) → op(x, foldr(a, xs)) [1]
foldr(a, Nil) → a [1]
foldl(a, Nil) → a [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
op(x, S(0)) → S(x) [1]
op(S(0), y) → S(y) [1]
fold(a, xs) → Cons(foldl(a, xs), Cons(foldr(a, xs), Nil)) [1]
foldl(x, Cons(S(0), xs)) → foldl(S(x), xs) [1]
foldl(S(0), Cons(x, xs)) → foldl(S(x), xs) [1]
foldr(a, Cons(x, xs)) → op(x, foldr(a, xs)) [1]
foldr(a, Nil) → a [1]
foldl(a, Nil) → a [1]
notEmpty(Cons(x, xs)) → True [1]
notEmpty(Nil) → False [1]
op(x, S(0)) → S(x) [1]
op(S(0), y) → S(y) [1]
fold(a, xs) → Cons(foldl(a, xs), Cons(foldr(a, xs), Nil)) [1]
foldl :: 0:S → Cons:Nil → 0:S Cons :: 0:S → Cons:Nil → Cons:Nil S :: 0:S → 0:S 0 :: 0:S foldr :: 0:S → Cons:Nil → 0:S op :: 0:S → 0:S → 0:S Nil :: Cons:Nil notEmpty :: Cons:Nil → True:False True :: True:False False :: True:False fold :: 0:S → Cons:Nil → Cons:Nil |
(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:
foldl
notEmpty
fold
foldr
op
op(v0, v1) → 0 [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 |
0 => 0
Nil => 0
True => 1
False => 0
fold(z, z') -{ 1 }→ 1 + foldl(a, xs) + (1 + foldr(a, xs) + 0) :|: z = a, xs >= 0, a >= 0, z' = xs
foldl(z, z') -{ 1 }→ a :|: z = a, a >= 0, z' = 0
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: z' = 1 + (1 + 0) + xs, xs >= 0, x >= 0, z = x
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldr(z, z') -{ 1 }→ a :|: z = a, a >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, a) :|: z = a, a >= 0, x >= 0, z' = 1 + x + 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(a, xs'))) :|: z = a, a >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
op(z, z') -{ 1 }→ 1 + x :|: x >= 0, z' = 1 + 0, z = x
op(z, z') -{ 1 }→ 1 + y :|: z = 1 + 0, y >= 0, z' = y
op(z, z') -{ 1 }→ 1 + x :|: x >= 0, z' = 1 + 0, z = x
op(z, z') -{ 1 }→ 1 + y :|: z = 1 + 0, y >= 0, z' = y
op(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
fold(z, z') -{ 1 }→ 1 + foldl(a, xs) + (1 + foldr(a, xs) + 0) :|: z = a, xs >= 0, a >= 0, z' = xs
foldl(z, z') -{ 1 }→ a :|: z = a, a >= 0, z' = 0
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: z' = 1 + (1 + 0) + xs, xs >= 0, x >= 0, z = x
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldr(z, z') -{ 1 }→ a :|: z = a, a >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(a, xs'))) :|: z = a, a >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z = a, a >= 0, x >= 0, z' = 1 + x + 0, v0 >= 0, v1 >= 0, x = v0, a = v1
foldr(z, z') -{ 3 }→ 1 + x' :|: z = a, a >= 0, x >= 0, z' = 1 + x + 0, x' >= 0, a = 1 + 0, x = x'
foldr(z, z') -{ 3 }→ 1 + y :|: z = a, a >= 0, x >= 0, z' = 1 + x + 0, x = 1 + 0, y >= 0, a = y
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1
op(z, z') -{ 1 }→ 1 + x :|: x >= 0, z' = 1 + 0, z = x
op(z, z') -{ 1 }→ 1 + y :|: z = 1 + 0, y >= 0, z' = y
fold(z, z') -{ 1 }→ 1 + foldl(z, z') + (1 + foldr(z, z') + 0) :|: z' >= 0, z >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ foldl(1 + z, z' - 2) :|: z' - 2 >= 0, z >= 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
{ foldl } { notEmpty } { op } { foldr } { fold } |
fold(z, z') -{ 1 }→ 1 + foldl(z, z') + (1 + foldr(z, z') + 0) :|: z' >= 0, z >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ foldl(1 + z, z' - 2) :|: z' - 2 >= 0, z >= 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
fold(z, z') -{ 1 }→ 1 + foldl(z, z') + (1 + foldr(z, z') + 0) :|: z' >= 0, z >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ foldl(1 + z, z' - 2) :|: z' - 2 >= 0, z >= 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: ?, size: O(n1) [z + z'] |
fold(z, z') -{ 1 }→ 1 + foldl(z, z') + (1 + foldr(z, z') + 0) :|: z' >= 0, z >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldl(z, z') -{ 1 }→ foldl(1 + x, xs) :|: xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ foldl(1 + z, z' - 2) :|: z' - 2 >= 0, z >= 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: ?, size: O(1) [1] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: ?, size: O(n1) [z + z'] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] foldr: runtime: ?, size: O(n1) [z + z'] |
fold(z, z') -{ 2 + z' }→ 1 + s'' + (1 + foldr(z, z') + 0) :|: s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ op(x, op(x', foldr(z, xs'))) :|: z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] foldr: runtime: O(n1) [3 + 4·z'], size: O(n1) [z + z'] |
fold(z, z') -{ 5 + 5·z' }→ 1 + s'' + (1 + s1 + 0) :|: s1 >= 0, s1 <= 1 * z + 1 * z', s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 7 + 4·xs' }→ s4 :|: s2 >= 0, s2 <= 1 * z + 1 * xs', s3 >= 0, s3 <= 1 * x' + 1 * s2, s4 >= 0, s4 <= 1 * x + 1 * s3, z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] foldr: runtime: O(n1) [3 + 4·z'], size: O(n1) [z + z'] |
fold(z, z') -{ 5 + 5·z' }→ 1 + s'' + (1 + s1 + 0) :|: s1 >= 0, s1 <= 1 * z + 1 * z', s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 7 + 4·xs' }→ s4 :|: s2 >= 0, s2 <= 1 * z + 1 * xs', s3 >= 0, s3 <= 1 * x' + 1 * s2, s4 >= 0, s4 <= 1 * x + 1 * s3, z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] foldr: runtime: O(n1) [3 + 4·z'], size: O(n1) [z + z'] fold: runtime: ?, size: O(n1) [2 + 2·z + 2·z'] |
fold(z, z') -{ 5 + 5·z' }→ 1 + s'' + (1 + s1 + 0) :|: s1 >= 0, s1 <= 1 * z + 1 * z', s'' >= 0, s'' <= 1 * z + 1 * z', z' >= 0, z >= 0
foldl(z, z') -{ z' }→ s :|: s >= 0, s <= 1 * (1 + z) + 1 * (z' - 2), z' - 2 >= 0, z >= 0
foldl(z, z') -{ 2 + xs }→ s' :|: s' >= 0, s' <= 1 * (1 + x) + 1 * xs, xs >= 0, z' = 1 + x + xs, z = 1 + 0, x >= 0
foldl(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 7 + 4·xs' }→ s4 :|: s2 >= 0, s2 <= 1 * z + 1 * xs', s3 >= 0, s3 <= 1 * x' + 1 * s2, s4 >= 0, s4 <= 1 * x + 1 * s3, z >= 0, x >= 0, x' >= 0, xs' >= 0, z' = 1 + x + (1 + x' + xs')
foldr(z, z') -{ 1 }→ z :|: z >= 0, z' = 0
foldr(z, z') -{ 2 }→ 0 :|: z >= 0, z' - 1 >= 0, v0 >= 0, z' - 1 = v0
foldr(z, z') -{ 3 }→ 1 + x' :|: z >= 0, z' - 1 >= 0, x' >= 0, z = 1 + 0, z' - 1 = x'
foldr(z, z') -{ 3 }→ 1 + z :|: z >= 0, z' - 1 >= 0, z' - 1 = 1 + 0
notEmpty(z) -{ 1 }→ 1 :|: z = 1 + x + xs, xs >= 0, x >= 0
notEmpty(z) -{ 1 }→ 0 :|: z = 0
op(z, z') -{ 0 }→ 0 :|: z >= 0, z' >= 0
op(z, z') -{ 1 }→ 1 + z :|: z >= 0, z' = 1 + 0
op(z, z') -{ 1 }→ 1 + z' :|: z = 1 + 0, z' >= 0
foldl: runtime: O(n1) [1 + z'], size: O(n1) [z + z'] notEmpty: runtime: O(1) [1], size: O(1) [1] op: runtime: O(1) [1], size: O(n1) [z + z'] foldr: runtime: O(n1) [3 + 4·z'], size: O(n1) [z + z'] fold: runtime: O(n1) [5 + 5·z'], size: O(n1) [2 + 2·z + 2·z'] |