/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^3), O(n^3)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). (0) CpxTRS (1) RelTrsToWeightedTrsProof [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), 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) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) IntTrsBoundProof [UPPER BOUND(ID), 201 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 55 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 414 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 86 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 87 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 53 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 97 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 13 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 272 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 103 ms] (44) CpxRNTS (45) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (46) CpxRNTS (47) IntTrsBoundProof [UPPER BOUND(ID), 1424 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 131 ms] (50) CpxRNTS (51) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (52) CpxRNTS (53) IntTrsBoundProof [UPPER BOUND(ID), 477 ms] (54) CpxRNTS (55) IntTrsBoundProof [UPPER BOUND(ID), 0 ms] (56) CpxRNTS (57) FinalProof [FINISHED, 0 ms] (58) BOUNDS(1, n^3) (59) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (60) CpxTRS (61) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (62) typed CpxTrs (63) OrderProof [LOWER BOUND(ID), 0 ms] (64) typed CpxTrs (65) RewriteLemmaProof [LOWER BOUND(ID), 271 ms] (66) BEST (67) proven lower bound (68) LowerBoundPropagationProof [FINISHED, 0 ms] (69) BOUNDS(n^1, INF) (70) typed CpxTrs (71) RewriteLemmaProof [LOWER BOUND(ID), 7 ms] (72) BEST (73) proven lower bound (74) LowerBoundPropagationProof [FINISHED, 0 ms] (75) BOUNDS(n^2, INF) (76) typed CpxTrs (77) RewriteLemmaProof [LOWER BOUND(ID), 723 ms] (78) proven lower bound (79) LowerBoundPropagationProof [FINISHED, 0 ms] (80) BOUNDS(n^3, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). The TRS R consists of the following rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^3). The TRS R consists of the following rules: null(nil) -> true [1] null(add(n, x)) -> false [1] tail(add(n, x)) -> x [1] tail(nil) -> nil [1] head(add(n, x)) -> n [1] app(nil, y) -> y [1] app(add(n, x), y) -> add(n, app(x, y)) [1] reverse(nil) -> nil [1] reverse(add(n, x)) -> app(reverse(x), add(n, nil)) [1] shuffle(x) -> shuff(x, nil) [1] shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) [1] if(true, x, y, z) -> y [1] if(false, x, y, z) -> shuff(reverse(tail(x)), z) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: null(nil) -> true [1] null(add(n, x)) -> false [1] tail(add(n, x)) -> x [1] tail(nil) -> nil [1] head(add(n, x)) -> n [1] app(nil, y) -> y [1] app(add(n, x), y) -> add(n, app(x, y)) [1] reverse(nil) -> nil [1] reverse(add(n, x)) -> app(reverse(x), add(n, nil)) [1] shuffle(x) -> shuff(x, nil) [1] shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) [1] if(true, x, y, z) -> y [1] if(false, x, y, z) -> shuff(reverse(tail(x)), z) [1] The TRS has the following type information: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add Rewrite Strategy: INNERMOST ---------------------------------------- (5) CompletionProof (UPPER BOUND(ID)) 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: shuffle_1 shuff_2 if_4 (c) The following functions are completely defined: null_1 app_2 head_1 reverse_1 tail_1 Due to the following rules being added: head(v0) -> const [0] 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: null(nil) -> true [1] null(add(n, x)) -> false [1] tail(add(n, x)) -> x [1] tail(nil) -> nil [1] head(add(n, x)) -> n [1] app(nil, y) -> y [1] app(add(n, x), y) -> add(n, app(x, y)) [1] reverse(nil) -> nil [1] reverse(add(n, x)) -> app(reverse(x), add(n, nil)) [1] shuffle(x) -> shuff(x, nil) [1] shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) [1] if(true, x, y, z) -> y [1] if(false, x, y, z) -> shuff(reverse(tail(x)), z) [1] head(v0) -> const [0] The TRS has the following type information: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: const -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> const app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add const :: const Rewrite Strategy: INNERMOST ---------------------------------------- (7) NarrowingProof (BOTH BOUNDS(ID, ID)) 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: null(nil) -> true [1] null(add(n, x)) -> false [1] tail(add(n, x)) -> x [1] tail(nil) -> nil [1] head(add(n, x)) -> n [1] app(nil, y) -> y [1] app(add(n, x), y) -> add(n, app(x, y)) [1] reverse(nil) -> nil [1] reverse(add(n, nil)) -> app(nil, add(n, nil)) [2] reverse(add(n, add(n', x'))) -> app(app(reverse(x'), add(n', nil)), add(n, nil)) [2] shuffle(x) -> shuff(x, nil) [1] shuff(nil, y) -> if(true, nil, y, app(y, add(const, nil))) [2] shuff(add(n'', x''), y) -> if(false, add(n'', x''), y, app(y, add(n'', nil))) [3] shuff(add(n'', x''), y) -> if(false, add(n'', x''), y, app(y, add(const, nil))) [2] if(true, x, y, z) -> y [1] if(false, add(n1, x1), y, z) -> shuff(reverse(x1), z) [2] if(false, nil, y, z) -> shuff(reverse(nil), z) [2] head(v0) -> const [0] The TRS has the following type information: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: const -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> const app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add const :: const Rewrite Strategy: INNERMOST ---------------------------------------- (9) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: nil => 0 true => 1 false => 0 const => 0 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> y :|: z'' = y, y >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, y) :|: n >= 0, z'' = y, z' = 1 + n + x, x >= 0, y >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: v0 >= 0, z' = v0 if(z', z'', z1, z2) -{ 1 }-> y :|: z1 = y, z >= 0, z2 = z, x >= 0, y >= 0, z'' = x, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z) :|: z1 = y, x1 >= 0, z >= 0, z2 = z, y >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z) :|: z'' = 0, z1 = y, z >= 0, z2 = z, y >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + n + 0) :|: n >= 0, z' = 1 + n + 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, y, app(y, 1 + 0 + 0)) :|: z'' = y, y >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', y, app(y, 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' = y, y >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', y, app(y, 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' = y, y >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(x, 0) :|: z' = x, x >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 ---------------------------------------- (11) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 ---------------------------------------- (13) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { head } { app } { null } { tail } { reverse } { shuff, if } { shuffle } ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {head}, {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle} ---------------------------------------- (15) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {head}, {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle} ---------------------------------------- (17) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: head after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {head}, {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (19) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: head 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: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: app after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' + z'' ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {app}, {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: ?, size: O(n^1) [z' + z''] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: app after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z' ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 1 }-> 1 + n + app(x, z'') :|: n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 2 }-> app(0, 1 + (z' - 1) + 0) :|: z' - 1 >= 0 reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 2 }-> if(1, 0, z'', app(z'', 1 + 0 + 0)) :|: z'' >= 0, z' = 0 shuff(z', z'') -{ 3 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + n'' + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 2 }-> if(0, 1 + n'' + x'', z'', app(z'', 1 + 0 + 0)) :|: z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: null 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: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {null}, {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: ?, size: O(1) [1] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: null 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: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (33) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: tail after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {tail}, {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (37) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: tail after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] ---------------------------------------- (39) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: reverse after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {reverse}, {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (43) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: reverse after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: 4 + 3*z' + 2*z'^2 ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(x1), z2) :|: x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 2 }-> shuff(reverse(0), z2) :|: z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 2 }-> app(app(reverse(x'), 1 + n' + 0), 1 + n + 0) :|: n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] ---------------------------------------- (45) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (46) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 6 + 3*x1 + 2*x1^2 }-> shuff(s6, z2) :|: s6 >= 0, s6 <= x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 6 }-> shuff(s7, z2) :|: s7 >= 0, s7 <= 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 8 + s3 + s4 + 3*x' + 2*x'^2 }-> s5 :|: s3 >= 0, s3 <= x', s4 >= 0, s4 <= s3 + (1 + n' + 0), s5 >= 0, s5 <= s4 + (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] ---------------------------------------- (47) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: shuff after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: z'^2 + z'' Computed SIZE bound using KoAT for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: z''^2 + z1 + 2*z2 ---------------------------------------- (48) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 6 + 3*x1 + 2*x1^2 }-> shuff(s6, z2) :|: s6 >= 0, s6 <= x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 6 }-> shuff(s7, z2) :|: s7 >= 0, s7 <= 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 8 + s3 + s4 + 3*x' + 2*x'^2 }-> s5 :|: s3 >= 0, s3 <= x', s4 >= 0, s4 <= s3 + (1 + n' + 0), s5 >= 0, s5 <= s4 + (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {shuff,if}, {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] shuff: runtime: ?, size: O(n^2) [z'^2 + z''] if: runtime: ?, size: O(n^2) [z''^2 + z1 + 2*z2] ---------------------------------------- (49) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: shuff after applying outer abstraction to obtain an ITS, resulting in: O(n^3) with polynomial bound: 20 + 47*z' + 6*z'*z'' + 26*z'^2 + 16*z'^3 + 3*z'' Computed RUNTIME bound using KoAT for: if after applying outer abstraction to obtain an ITS, resulting in: O(n^3) with polynomial bound: 53 + 50*z'' + 6*z''*z2 + 28*z''^2 + 16*z''^3 + 6*z2 ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 if(z', z'', z1, z2) -{ 6 + 3*x1 + 2*x1^2 }-> shuff(s6, z2) :|: s6 >= 0, s6 <= x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 6 }-> shuff(s7, z2) :|: s7 >= 0, s7 <= 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 8 + s3 + s4 + 3*x' + 2*x'^2 }-> s5 :|: s3 >= 0, s3 <= x', s4 >= 0, s4 <= s3 + (1 + n' + 0), s5 >= 0, s5 <= s4 + (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 3 + z'' }-> if(1, 0, z'', s'') :|: s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuff(z', z'') -{ 4 + z'' }-> if(0, 1 + n'' + x'', z'', s1) :|: s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 3 + z'' }-> if(0, 1 + n'' + x'', z'', s2) :|: s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuffle(z') -{ 1 }-> shuff(z', 0) :|: z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] shuff: runtime: O(n^3) [20 + 47*z' + 6*z'*z'' + 26*z'^2 + 16*z'^3 + 3*z''], size: O(n^2) [z'^2 + z''] if: runtime: O(n^3) [53 + 50*z'' + 6*z''*z2 + 28*z''^2 + 16*z''^3 + 6*z2], size: O(n^2) [z''^2 + z1 + 2*z2] ---------------------------------------- (51) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (52) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 26 + 47*s6 + 6*s6*z2 + 26*s6^2 + 16*s6^3 + 3*x1 + 2*x1^2 + 3*z2 }-> s12 :|: s12 >= 0, s12 <= s6 * s6 + z2, s6 >= 0, s6 <= x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 26 + 47*s7 + 6*s7*z2 + 26*s7^2 + 16*s7^3 + 3*z2 }-> s13 :|: s13 >= 0, s13 <= s7 * s7 + z2, s7 >= 0, s7 <= 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 8 + s3 + s4 + 3*x' + 2*x'^2 }-> s5 :|: s3 >= 0, s3 <= x', s4 >= 0, s4 <= s3 + (1 + n' + 0), s5 >= 0, s5 <= s4 + (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 151 + 154*n'' + 6*n''*s1 + 152*n''*x'' + 48*n''*x''^2 + 76*n''^2 + 48*n''^2*x'' + 16*n''^3 + 12*s1 + 6*s1*x'' + 154*x'' + 76*x''^2 + 16*x''^3 + z'' }-> s10 :|: s10 >= 0, s10 <= 2 * s1 + (1 + n'' + x'') * (1 + n'' + x'') + z'', s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 150 + 154*n'' + 6*n''*s2 + 152*n''*x'' + 48*n''*x''^2 + 76*n''^2 + 48*n''^2*x'' + 16*n''^3 + 12*s2 + 6*s2*x'' + 154*x'' + 76*x''^2 + 16*x''^3 + z'' }-> s11 :|: s11 >= 0, s11 <= 2 * s2 + (1 + n'' + x'') * (1 + n'' + x'') + z'', s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 56 + 6*s'' + z'' }-> s9 :|: s9 >= 0, s9 <= 2 * s'' + 0 * 0 + z'', s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuffle(z') -{ 21 + 47*z' + 26*z'^2 + 16*z'^3 }-> s8 :|: s8 >= 0, s8 <= z' * z' + 0, z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] shuff: runtime: O(n^3) [20 + 47*z' + 6*z'*z'' + 26*z'^2 + 16*z'^3 + 3*z''], size: O(n^2) [z'^2 + z''] if: runtime: O(n^3) [53 + 50*z'' + 6*z''*z2 + 28*z''^2 + 16*z''^3 + 6*z2], size: O(n^2) [z''^2 + z1 + 2*z2] ---------------------------------------- (53) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: shuffle after applying outer abstraction to obtain an ITS, resulting in: O(n^2) with polynomial bound: z'^2 ---------------------------------------- (54) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 26 + 47*s6 + 6*s6*z2 + 26*s6^2 + 16*s6^3 + 3*x1 + 2*x1^2 + 3*z2 }-> s12 :|: s12 >= 0, s12 <= s6 * s6 + z2, s6 >= 0, s6 <= x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 26 + 47*s7 + 6*s7*z2 + 26*s7^2 + 16*s7^3 + 3*z2 }-> s13 :|: s13 >= 0, s13 <= s7 * s7 + z2, s7 >= 0, s7 <= 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 8 + s3 + s4 + 3*x' + 2*x'^2 }-> s5 :|: s3 >= 0, s3 <= x', s4 >= 0, s4 <= s3 + (1 + n' + 0), s5 >= 0, s5 <= s4 + (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 151 + 154*n'' + 6*n''*s1 + 152*n''*x'' + 48*n''*x''^2 + 76*n''^2 + 48*n''^2*x'' + 16*n''^3 + 12*s1 + 6*s1*x'' + 154*x'' + 76*x''^2 + 16*x''^3 + z'' }-> s10 :|: s10 >= 0, s10 <= 2 * s1 + (1 + n'' + x'') * (1 + n'' + x'') + z'', s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 150 + 154*n'' + 6*n''*s2 + 152*n''*x'' + 48*n''*x''^2 + 76*n''^2 + 48*n''^2*x'' + 16*n''^3 + 12*s2 + 6*s2*x'' + 154*x'' + 76*x''^2 + 16*x''^3 + z'' }-> s11 :|: s11 >= 0, s11 <= 2 * s2 + (1 + n'' + x'') * (1 + n'' + x'') + z'', s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 56 + 6*s'' + z'' }-> s9 :|: s9 >= 0, s9 <= 2 * s'' + 0 * 0 + z'', s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuffle(z') -{ 21 + 47*z' + 26*z'^2 + 16*z'^3 }-> s8 :|: s8 >= 0, s8 <= z' * z' + 0, z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: {shuffle} Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] shuff: runtime: O(n^3) [20 + 47*z' + 6*z'*z'' + 26*z'^2 + 16*z'^3 + 3*z''], size: O(n^2) [z'^2 + z''] if: runtime: O(n^3) [53 + 50*z'' + 6*z''*z2 + 28*z''^2 + 16*z''^3 + 6*z2], size: O(n^2) [z''^2 + z1 + 2*z2] shuffle: runtime: ?, size: O(n^2) [z'^2] ---------------------------------------- (55) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: shuffle after applying outer abstraction to obtain an ITS, resulting in: O(n^3) with polynomial bound: 21 + 47*z' + 26*z'^2 + 16*z'^3 ---------------------------------------- (56) Obligation: Complexity RNTS consisting of the following rules: app(z', z'') -{ 1 }-> z'' :|: z'' >= 0, z' = 0 app(z', z'') -{ 2 + x }-> 1 + n + s :|: s >= 0, s <= x + z'', n >= 0, z' = 1 + n + x, x >= 0, z'' >= 0 head(z') -{ 1 }-> n :|: n >= 0, z' = 1 + n + x, x >= 0 head(z') -{ 0 }-> 0 :|: z' >= 0 if(z', z'', z1, z2) -{ 26 + 47*s6 + 6*s6*z2 + 26*s6^2 + 16*s6^3 + 3*x1 + 2*x1^2 + 3*z2 }-> s12 :|: s12 >= 0, s12 <= s6 * s6 + z2, s6 >= 0, s6 <= x1, x1 >= 0, z2 >= 0, z1 >= 0, z'' = 1 + n1 + x1, n1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 26 + 47*s7 + 6*s7*z2 + 26*s7^2 + 16*s7^3 + 3*z2 }-> s13 :|: s13 >= 0, s13 <= s7 * s7 + z2, s7 >= 0, s7 <= 0, z'' = 0, z2 >= 0, z1 >= 0, z' = 0 if(z', z'', z1, z2) -{ 1 }-> z1 :|: z2 >= 0, z'' >= 0, z1 >= 0, z' = 1 null(z') -{ 1 }-> 1 :|: z' = 0 null(z') -{ 1 }-> 0 :|: n >= 0, z' = 1 + n + x, x >= 0 reverse(z') -{ 3 }-> s' :|: s' >= 0, s' <= 0 + (1 + (z' - 1) + 0), z' - 1 >= 0 reverse(z') -{ 8 + s3 + s4 + 3*x' + 2*x'^2 }-> s5 :|: s3 >= 0, s3 <= x', s4 >= 0, s4 <= s3 + (1 + n' + 0), s5 >= 0, s5 <= s4 + (1 + n + 0), n >= 0, x' >= 0, n' >= 0, z' = 1 + n + (1 + n' + x') reverse(z') -{ 1 }-> 0 :|: z' = 0 shuff(z', z'') -{ 151 + 154*n'' + 6*n''*s1 + 152*n''*x'' + 48*n''*x''^2 + 76*n''^2 + 48*n''^2*x'' + 16*n''^3 + 12*s1 + 6*s1*x'' + 154*x'' + 76*x''^2 + 16*x''^3 + z'' }-> s10 :|: s10 >= 0, s10 <= 2 * s1 + (1 + n'' + x'') * (1 + n'' + x'') + z'', s1 >= 0, s1 <= z'' + (1 + n'' + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 150 + 154*n'' + 6*n''*s2 + 152*n''*x'' + 48*n''*x''^2 + 76*n''^2 + 48*n''^2*x'' + 16*n''^3 + 12*s2 + 6*s2*x'' + 154*x'' + 76*x''^2 + 16*x''^3 + z'' }-> s11 :|: s11 >= 0, s11 <= 2 * s2 + (1 + n'' + x'') * (1 + n'' + x'') + z'', s2 >= 0, s2 <= z'' + (1 + 0 + 0), z' = 1 + n'' + x'', z'' >= 0, n'' >= 0, x'' >= 0 shuff(z', z'') -{ 56 + 6*s'' + z'' }-> s9 :|: s9 >= 0, s9 <= 2 * s'' + 0 * 0 + z'', s'' >= 0, s'' <= z'' + (1 + 0 + 0), z'' >= 0, z' = 0 shuffle(z') -{ 21 + 47*z' + 26*z'^2 + 16*z'^3 }-> s8 :|: s8 >= 0, s8 <= z' * z' + 0, z' >= 0 tail(z') -{ 1 }-> x :|: n >= 0, z' = 1 + n + x, x >= 0 tail(z') -{ 1 }-> 0 :|: z' = 0 Function symbols to be analyzed: Previous analysis results are: head: runtime: O(1) [1], size: O(n^1) [z'] app: runtime: O(n^1) [1 + z'], size: O(n^1) [z' + z''] null: runtime: O(1) [1], size: O(1) [1] tail: runtime: O(1) [1], size: O(n^1) [z'] reverse: runtime: O(n^2) [4 + 3*z' + 2*z'^2], size: O(n^1) [z'] shuff: runtime: O(n^3) [20 + 47*z' + 6*z'*z'' + 26*z'^2 + 16*z'^3 + 3*z''], size: O(n^2) [z'^2 + z''] if: runtime: O(n^3) [53 + 50*z'' + 6*z''*z2 + 28*z''^2 + 16*z''^3 + 6*z2], size: O(n^2) [z''^2 + z1 + 2*z2] shuffle: runtime: O(n^3) [21 + 47*z' + 26*z'^2 + 16*z'^3], size: O(n^2) [z'^2] ---------------------------------------- (57) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (58) BOUNDS(1, n^3) ---------------------------------------- (59) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (60) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (61) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (62) Obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add ---------------------------------------- (63) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: app, reverse, shuff They will be analysed ascendingly in the following order: app < reverse app < shuff reverse < shuff ---------------------------------------- (64) Obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add Generator Equations: gen_nil:add4_0(0) <=> nil gen_nil:add4_0(+(x, 1)) <=> add(hole_head3_0, gen_nil:add4_0(x)) The following defined symbols remain to be analysed: app, reverse, shuff They will be analysed ascendingly in the following order: app < reverse app < shuff reverse < shuff ---------------------------------------- (65) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: app(gen_nil:add4_0(n6_0), gen_nil:add4_0(b)) -> gen_nil:add4_0(+(n6_0, b)), rt in Omega(1 + n6_0) Induction Base: app(gen_nil:add4_0(0), gen_nil:add4_0(b)) ->_R^Omega(1) gen_nil:add4_0(b) Induction Step: app(gen_nil:add4_0(+(n6_0, 1)), gen_nil:add4_0(b)) ->_R^Omega(1) add(hole_head3_0, app(gen_nil:add4_0(n6_0), gen_nil:add4_0(b))) ->_IH add(hole_head3_0, gen_nil:add4_0(+(b, c7_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (66) Complex Obligation (BEST) ---------------------------------------- (67) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add Generator Equations: gen_nil:add4_0(0) <=> nil gen_nil:add4_0(+(x, 1)) <=> add(hole_head3_0, gen_nil:add4_0(x)) The following defined symbols remain to be analysed: app, reverse, shuff They will be analysed ascendingly in the following order: app < reverse app < shuff reverse < shuff ---------------------------------------- (68) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (69) BOUNDS(n^1, INF) ---------------------------------------- (70) Obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add Lemmas: app(gen_nil:add4_0(n6_0), gen_nil:add4_0(b)) -> gen_nil:add4_0(+(n6_0, b)), rt in Omega(1 + n6_0) Generator Equations: gen_nil:add4_0(0) <=> nil gen_nil:add4_0(+(x, 1)) <=> add(hole_head3_0, gen_nil:add4_0(x)) The following defined symbols remain to be analysed: reverse, shuff They will be analysed ascendingly in the following order: reverse < shuff ---------------------------------------- (71) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: reverse(gen_nil:add4_0(n665_0)) -> gen_nil:add4_0(n665_0), rt in Omega(1 + n665_0 + n665_0^2) Induction Base: reverse(gen_nil:add4_0(0)) ->_R^Omega(1) nil Induction Step: reverse(gen_nil:add4_0(+(n665_0, 1))) ->_R^Omega(1) app(reverse(gen_nil:add4_0(n665_0)), add(hole_head3_0, nil)) ->_IH app(gen_nil:add4_0(c666_0), add(hole_head3_0, nil)) ->_L^Omega(1 + n665_0) gen_nil:add4_0(+(n665_0, +(0, 1))) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (72) Complex Obligation (BEST) ---------------------------------------- (73) Obligation: Proved the lower bound n^2 for the following obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add Lemmas: app(gen_nil:add4_0(n6_0), gen_nil:add4_0(b)) -> gen_nil:add4_0(+(n6_0, b)), rt in Omega(1 + n6_0) Generator Equations: gen_nil:add4_0(0) <=> nil gen_nil:add4_0(+(x, 1)) <=> add(hole_head3_0, gen_nil:add4_0(x)) The following defined symbols remain to be analysed: reverse, shuff They will be analysed ascendingly in the following order: reverse < shuff ---------------------------------------- (74) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (75) BOUNDS(n^2, INF) ---------------------------------------- (76) Obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add Lemmas: app(gen_nil:add4_0(n6_0), gen_nil:add4_0(b)) -> gen_nil:add4_0(+(n6_0, b)), rt in Omega(1 + n6_0) reverse(gen_nil:add4_0(n665_0)) -> gen_nil:add4_0(n665_0), rt in Omega(1 + n665_0 + n665_0^2) Generator Equations: gen_nil:add4_0(0) <=> nil gen_nil:add4_0(+(x, 1)) <=> add(hole_head3_0, gen_nil:add4_0(x)) The following defined symbols remain to be analysed: shuff ---------------------------------------- (77) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: shuff(gen_nil:add4_0(n952_0), gen_nil:add4_0(b)) -> *5_0, rt in Omega(b*n952_0 + n952_0 + n952_0^2 + n952_0^3) Induction Base: shuff(gen_nil:add4_0(0), gen_nil:add4_0(b)) Induction Step: shuff(gen_nil:add4_0(+(n952_0, 1)), gen_nil:add4_0(b)) ->_R^Omega(1) if(null(gen_nil:add4_0(+(n952_0, 1))), gen_nil:add4_0(+(n952_0, 1)), gen_nil:add4_0(b), app(gen_nil:add4_0(b), add(head(gen_nil:add4_0(+(n952_0, 1))), nil))) ->_R^Omega(1) if(false, gen_nil:add4_0(+(1, n952_0)), gen_nil:add4_0(b), app(gen_nil:add4_0(b), add(head(gen_nil:add4_0(+(1, n952_0))), nil))) ->_R^Omega(1) if(false, gen_nil:add4_0(+(1, n952_0)), gen_nil:add4_0(b), app(gen_nil:add4_0(b), add(hole_head3_0, nil))) ->_L^Omega(1 + b) if(false, gen_nil:add4_0(+(1, n952_0)), gen_nil:add4_0(+(0, 1)), gen_nil:add4_0(+(b, +(0, 1)))) ->_R^Omega(1) shuff(reverse(tail(gen_nil:add4_0(+(1, n952_0)))), gen_nil:add4_0(+(1, b))) ->_R^Omega(1) shuff(reverse(gen_nil:add4_0(n952_0)), gen_nil:add4_0(+(1, b))) ->_L^Omega(1 + n952_0 + n952_0^2) shuff(gen_nil:add4_0(n952_0), gen_nil:add4_0(+(1, b))) ->_IH *5_0 We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). ---------------------------------------- (78) Obligation: Proved the lower bound n^3 for the following obligation: Innermost TRS: Rules: null(nil) -> true null(add(n, x)) -> false tail(add(n, x)) -> x tail(nil) -> nil head(add(n, x)) -> n app(nil, y) -> y app(add(n, x), y) -> add(n, app(x, y)) reverse(nil) -> nil reverse(add(n, x)) -> app(reverse(x), add(n, nil)) shuffle(x) -> shuff(x, nil) shuff(x, y) -> if(null(x), x, y, app(y, add(head(x), nil))) if(true, x, y, z) -> y if(false, x, y, z) -> shuff(reverse(tail(x)), z) Types: null :: nil:add -> true:false nil :: nil:add true :: true:false add :: head -> nil:add -> nil:add false :: true:false tail :: nil:add -> nil:add head :: nil:add -> head app :: nil:add -> nil:add -> nil:add reverse :: nil:add -> nil:add shuffle :: nil:add -> nil:add shuff :: nil:add -> nil:add -> nil:add if :: true:false -> nil:add -> nil:add -> nil:add -> nil:add hole_true:false1_0 :: true:false hole_nil:add2_0 :: nil:add hole_head3_0 :: head gen_nil:add4_0 :: Nat -> nil:add Lemmas: app(gen_nil:add4_0(n6_0), gen_nil:add4_0(b)) -> gen_nil:add4_0(+(n6_0, b)), rt in Omega(1 + n6_0) reverse(gen_nil:add4_0(n665_0)) -> gen_nil:add4_0(n665_0), rt in Omega(1 + n665_0 + n665_0^2) Generator Equations: gen_nil:add4_0(0) <=> nil gen_nil:add4_0(+(x, 1)) <=> add(hole_head3_0, gen_nil:add4_0(x)) The following defined symbols remain to be analysed: shuff ---------------------------------------- (79) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (80) BOUNDS(n^3, INF)