WORST_CASE(Omega(n^3),O(n^3)) proof of input_bDblas6hKs.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^3, n^3). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(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), 2 ms] (16) CpxRNTS (17) IntTrsBoundProof [UPPER BOUND(ID), 187 ms] (18) CpxRNTS (19) IntTrsBoundProof [UPPER BOUND(ID), 14 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 244 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 116 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 171 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 4 ms] (32) CpxRNTS (33) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 102 ms] (36) CpxRNTS (37) IntTrsBoundProof [UPPER BOUND(ID), 42 ms] (38) CpxRNTS (39) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 373 ms] (42) CpxRNTS (43) IntTrsBoundProof [UPPER BOUND(ID), 107 ms] (44) CpxRNTS (45) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (46) CpxRNTS (47) IntTrsBoundProof [UPPER BOUND(ID), 1240 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 181 ms] (50) CpxRNTS (51) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (52) CpxRNTS (53) IntTrsBoundProof [UPPER BOUND(ID), 457 ms] (54) CpxRNTS (55) IntTrsBoundProof [UPPER BOUND(ID), 2 ms] (56) CpxRNTS (57) FinalProof [FINISHED, 0 ms] (58) BOUNDS(1, n^3) (59) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (60) CdtProblem (61) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (62) CpxRelTRS (63) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (64) CpxRelTRS (65) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (66) typed CpxTrs (67) OrderProof [LOWER BOUND(ID), 11 ms] (68) typed CpxTrs (69) RewriteLemmaProof [LOWER BOUND(ID), 332 ms] (70) BEST (71) proven lower bound (72) LowerBoundPropagationProof [FINISHED, 0 ms] (73) BOUNDS(n^1, INF) (74) typed CpxTrs (75) RewriteLemmaProof [LOWER BOUND(ID), 99 ms] (76) typed CpxTrs (77) RewriteLemmaProof [LOWER BOUND(ID), 13 ms] (78) typed CpxTrs (79) RewriteLemmaProof [LOWER BOUND(ID), 790 ms] (80) BEST (81) proven lower bound (82) LowerBoundPropagationProof [FINISHED, 0 ms] (83) BOUNDS(n^2, INF) (84) typed CpxTrs (85) RewriteLemmaProof [LOWER BOUND(ID), 665 ms] (86) BEST (87) proven lower bound (88) LowerBoundPropagationProof [FINISHED, 0 ms] (89) BOUNDS(n^3, INF) (90) typed CpxTrs (91) RewriteLemmaProof [LOWER BOUND(ID), 1396 ms] (92) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-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: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(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) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (60) Obligation: Complexity Dependency Tuples Problem Rules: null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Tuples: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) S tuples: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) K tuples:none Defined Rule Symbols: null_1, tail_1, head_1, app_2, reverse_1, shuffle_1, shuff_2, if_4 Defined Pair Symbols: NULL_1, TAIL_1, HEAD_1, APP_2, REVERSE_1, SHUFFLE_1, SHUFF_2, IF_4 Compound Symbols: c, c1, c2, c3, c4, c5, c6_1, c7, c8_2, c9_1, c10_2, c11_3, c12, c13_3 ---------------------------------------- (61) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (62) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) The (relative) TRS S consists of the following rules: null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Rewrite Strategy: INNERMOST ---------------------------------------- (63) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (64) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^3, INF). The TRS R consists of the following rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) The (relative) TRS S consists of the following rules: null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Rewrite Strategy: INNERMOST ---------------------------------------- (65) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (66) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 ---------------------------------------- (67) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: APP, REVERSE, reverse, SHUFF, app, shuff They will be analysed ascendingly in the following order: APP < REVERSE APP < SHUFF reverse < REVERSE REVERSE < SHUFF reverse < SHUFF app < reverse reverse < shuff app < SHUFF app < shuff ---------------------------------------- (68) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: APP, REVERSE, reverse, SHUFF, app, shuff They will be analysed ascendingly in the following order: APP < REVERSE APP < SHUFF reverse < REVERSE REVERSE < SHUFF reverse < SHUFF app < reverse reverse < shuff app < SHUFF app < shuff ---------------------------------------- (69) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) Induction Base: APP(gen_nil:add12_14(0), gen_nil:add12_14(b)) ->_R^Omega(1) c5 Induction Step: APP(gen_nil:add12_14(+(n16_14, 1)), gen_nil:add12_14(b)) ->_R^Omega(1) c6(APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b))) ->_IH c6(gen_c5:c613_14(c17_14)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (70) Complex Obligation (BEST) ---------------------------------------- (71) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: APP, REVERSE, reverse, SHUFF, app, shuff They will be analysed ascendingly in the following order: APP < REVERSE APP < SHUFF reverse < REVERSE REVERSE < SHUFF reverse < SHUFF app < reverse reverse < shuff app < SHUFF app < shuff ---------------------------------------- (72) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (73) BOUNDS(n^1, INF) ---------------------------------------- (74) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: app, REVERSE, reverse, SHUFF, shuff They will be analysed ascendingly in the following order: reverse < REVERSE REVERSE < SHUFF reverse < SHUFF app < reverse reverse < shuff app < SHUFF app < shuff ---------------------------------------- (75) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) Induction Base: app(gen_nil:add12_14(0), gen_nil:add12_14(b)) ->_R^Omega(0) gen_nil:add12_14(b) Induction Step: app(gen_nil:add12_14(+(n700_14, 1)), gen_nil:add12_14(b)) ->_R^Omega(0) add(hole_head3_14, app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b))) ->_IH add(hole_head3_14, gen_nil:add12_14(+(b, c701_14))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (76) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: reverse, REVERSE, SHUFF, shuff They will be analysed ascendingly in the following order: reverse < REVERSE REVERSE < SHUFF reverse < SHUFF reverse < shuff ---------------------------------------- (77) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: reverse(gen_nil:add12_14(n1833_14)) -> gen_nil:add12_14(n1833_14), rt in Omega(0) Induction Base: reverse(gen_nil:add12_14(0)) ->_R^Omega(0) nil Induction Step: reverse(gen_nil:add12_14(+(n1833_14, 1))) ->_R^Omega(0) app(reverse(gen_nil:add12_14(n1833_14)), add(hole_head3_14, nil)) ->_IH app(gen_nil:add12_14(c1834_14), add(hole_head3_14, nil)) ->_L^Omega(0) gen_nil:add12_14(+(n1833_14, +(0, 1))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (78) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) reverse(gen_nil:add12_14(n1833_14)) -> gen_nil:add12_14(n1833_14), rt in Omega(0) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: REVERSE, SHUFF, shuff They will be analysed ascendingly in the following order: REVERSE < SHUFF ---------------------------------------- (79) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: REVERSE(gen_nil:add12_14(n2211_14)) -> *15_14, rt in Omega(n2211_14 + n2211_14^2) Induction Base: REVERSE(gen_nil:add12_14(0)) Induction Step: REVERSE(gen_nil:add12_14(+(n2211_14, 1))) ->_R^Omega(1) c8(APP(reverse(gen_nil:add12_14(n2211_14)), add(hole_head3_14, nil)), REVERSE(gen_nil:add12_14(n2211_14))) ->_L^Omega(0) c8(APP(gen_nil:add12_14(n2211_14), add(hole_head3_14, nil)), REVERSE(gen_nil:add12_14(n2211_14))) ->_L^Omega(1 + n2211_14) c8(gen_c5:c613_14(n2211_14), REVERSE(gen_nil:add12_14(n2211_14))) ->_IH c8(gen_c5:c613_14(n2211_14), *15_14) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (80) Complex Obligation (BEST) ---------------------------------------- (81) Obligation: Proved the lower bound n^2 for the following obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) reverse(gen_nil:add12_14(n1833_14)) -> gen_nil:add12_14(n1833_14), rt in Omega(0) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: REVERSE, SHUFF, shuff They will be analysed ascendingly in the following order: REVERSE < SHUFF ---------------------------------------- (82) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (83) BOUNDS(n^2, INF) ---------------------------------------- (84) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) reverse(gen_nil:add12_14(n1833_14)) -> gen_nil:add12_14(n1833_14), rt in Omega(0) REVERSE(gen_nil:add12_14(n2211_14)) -> *15_14, rt in Omega(n2211_14 + n2211_14^2) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: SHUFF, shuff ---------------------------------------- (85) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: SHUFF(gen_nil:add12_14(n6537_14), gen_nil:add12_14(b)) -> *15_14, rt in Omega(n6537_14 + n6537_14^2 + n6537_14^3) Induction Base: SHUFF(gen_nil:add12_14(0), gen_nil:add12_14(b)) Induction Step: SHUFF(gen_nil:add12_14(+(n6537_14, 1)), gen_nil:add12_14(b)) ->_R^Omega(1) c10(IF(null(gen_nil:add12_14(+(n6537_14, 1))), gen_nil:add12_14(+(n6537_14, 1)), gen_nil:add12_14(b), app(gen_nil:add12_14(b), add(head(gen_nil:add12_14(+(n6537_14, 1))), nil))), NULL(gen_nil:add12_14(+(n6537_14, 1)))) ->_R^Omega(0) c10(IF(false, gen_nil:add12_14(+(1, n6537_14)), gen_nil:add12_14(b), app(gen_nil:add12_14(b), add(head(gen_nil:add12_14(+(1, n6537_14))), nil))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_R^Omega(0) c10(IF(false, gen_nil:add12_14(+(1, n6537_14)), gen_nil:add12_14(b), app(gen_nil:add12_14(b), add(hole_head3_14, nil))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_L^Omega(0) c10(IF(false, gen_nil:add12_14(+(1, n6537_14)), gen_nil:add12_14(+(0, 1)), gen_nil:add12_14(+(b, +(0, 1)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_R^Omega(1) c10(c13(SHUFF(reverse(tail(gen_nil:add12_14(+(1, n6537_14)))), gen_nil:add12_14(+(1, b))), REVERSE(tail(gen_nil:add12_14(+(1, n6537_14)))), TAIL(gen_nil:add12_14(+(1, n6537_14)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_R^Omega(0) c10(c13(SHUFF(reverse(gen_nil:add12_14(n6537_14)), gen_nil:add12_14(+(1, b))), REVERSE(tail(gen_nil:add12_14(+(1, n6537_14)))), TAIL(gen_nil:add12_14(+(1, n6537_14)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_L^Omega(0) c10(c13(SHUFF(gen_nil:add12_14(n6537_14), gen_nil:add12_14(+(1, b))), REVERSE(tail(gen_nil:add12_14(+(1, n6537_14)))), TAIL(gen_nil:add12_14(+(1, n6537_14)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_IH c10(c13(*15_14, REVERSE(tail(gen_nil:add12_14(+(1, n6537_14)))), TAIL(gen_nil:add12_14(+(1, n6537_14)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_R^Omega(0) c10(c13(*15_14, REVERSE(gen_nil:add12_14(n6537_14)), TAIL(gen_nil:add12_14(+(1, n6537_14)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_L^Omega(n6537_14 + n6537_14^2) c10(c13(*15_14, *15_14, TAIL(gen_nil:add12_14(+(1, n6537_14)))), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_R^Omega(1) c10(c13(*15_14, *15_14, c2), NULL(gen_nil:add12_14(+(1, n6537_14)))) ->_R^Omega(1) c10(c13(*15_14, *15_14, c2), c1) We have rt in Omega(n^3) and sz in O(n). Thus, we have irc_R in Omega(n^3). ---------------------------------------- (86) Complex Obligation (BEST) ---------------------------------------- (87) Obligation: Proved the lower bound n^3 for the following obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) reverse(gen_nil:add12_14(n1833_14)) -> gen_nil:add12_14(n1833_14), rt in Omega(0) REVERSE(gen_nil:add12_14(n2211_14)) -> *15_14, rt in Omega(n2211_14 + n2211_14^2) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: SHUFF, shuff ---------------------------------------- (88) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (89) BOUNDS(n^3, INF) ---------------------------------------- (90) Obligation: Innermost TRS: Rules: NULL(nil) -> c NULL(add(z0, z1)) -> c1 TAIL(add(z0, z1)) -> c2 TAIL(nil) -> c3 HEAD(add(z0, z1)) -> c4 APP(nil, z0) -> c5 APP(add(z0, z1), z2) -> c6(APP(z1, z2)) REVERSE(nil) -> c7 REVERSE(add(z0, z1)) -> c8(APP(reverse(z1), add(z0, nil)), REVERSE(z1)) SHUFFLE(z0) -> c9(SHUFF(z0, nil)) SHUFF(z0, z1) -> c10(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), NULL(z0)) SHUFF(z0, z1) -> c11(IF(null(z0), z0, z1, app(z1, add(head(z0), nil))), APP(z1, add(head(z0), nil)), HEAD(z0)) IF(true, z0, z1, z2) -> c12 IF(false, z0, z1, z2) -> c13(SHUFF(reverse(tail(z0)), z2), REVERSE(tail(z0)), TAIL(z0)) null(nil) -> true null(add(z0, z1)) -> false tail(add(z0, z1)) -> z1 tail(nil) -> nil head(add(z0, z1)) -> z0 app(nil, z0) -> z0 app(add(z0, z1), z2) -> add(z0, app(z1, z2)) reverse(nil) -> nil reverse(add(z0, z1)) -> app(reverse(z1), add(z0, nil)) shuffle(z0) -> shuff(z0, nil) shuff(z0, z1) -> if(null(z0), z0, z1, app(z1, add(head(z0), nil))) if(true, z0, z1, z2) -> z1 if(false, z0, z1, z2) -> shuff(reverse(tail(z0)), z2) Types: NULL :: nil:add -> c:c1 nil :: nil:add c :: c:c1 add :: head -> nil:add -> nil:add c1 :: c:c1 TAIL :: nil:add -> c2:c3 c2 :: c2:c3 c3 :: c2:c3 HEAD :: nil:add -> c4 c4 :: c4 APP :: nil:add -> nil:add -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c5:c6 REVERSE :: nil:add -> c7:c8 c7 :: c7:c8 c8 :: c5:c6 -> c7:c8 -> c7:c8 reverse :: nil:add -> nil:add SHUFFLE :: nil:add -> c9 c9 :: c10:c11 -> c9 SHUFF :: nil:add -> nil:add -> c10:c11 c10 :: c12:c13 -> c:c1 -> c10:c11 IF :: true:false -> nil:add -> nil:add -> nil:add -> c12:c13 null :: nil:add -> true:false app :: nil:add -> nil:add -> nil:add head :: nil:add -> head c11 :: c12:c13 -> c5:c6 -> c4 -> c10:c11 true :: true:false c12 :: c12:c13 false :: true:false c13 :: c10:c11 -> c7:c8 -> c2:c3 -> c12:c13 tail :: 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_c:c11_14 :: c:c1 hole_nil:add2_14 :: nil:add hole_head3_14 :: head hole_c2:c34_14 :: c2:c3 hole_c45_14 :: c4 hole_c5:c66_14 :: c5:c6 hole_c7:c87_14 :: c7:c8 hole_c98_14 :: c9 hole_c10:c119_14 :: c10:c11 hole_c12:c1310_14 :: c12:c13 hole_true:false11_14 :: true:false gen_nil:add12_14 :: Nat -> nil:add gen_c5:c613_14 :: Nat -> c5:c6 gen_c7:c814_14 :: Nat -> c7:c8 Lemmas: APP(gen_nil:add12_14(n16_14), gen_nil:add12_14(b)) -> gen_c5:c613_14(n16_14), rt in Omega(1 + n16_14) app(gen_nil:add12_14(n700_14), gen_nil:add12_14(b)) -> gen_nil:add12_14(+(n700_14, b)), rt in Omega(0) reverse(gen_nil:add12_14(n1833_14)) -> gen_nil:add12_14(n1833_14), rt in Omega(0) REVERSE(gen_nil:add12_14(n2211_14)) -> *15_14, rt in Omega(n2211_14 + n2211_14^2) SHUFF(gen_nil:add12_14(n6537_14), gen_nil:add12_14(b)) -> *15_14, rt in Omega(n6537_14 + n6537_14^2 + n6537_14^3) Generator Equations: gen_nil:add12_14(0) <=> nil gen_nil:add12_14(+(x, 1)) <=> add(hole_head3_14, gen_nil:add12_14(x)) gen_c5:c613_14(0) <=> c5 gen_c5:c613_14(+(x, 1)) <=> c6(gen_c5:c613_14(x)) gen_c7:c814_14(0) <=> c7 gen_c7:c814_14(+(x, 1)) <=> c8(c5, gen_c7:c814_14(x)) The following defined symbols remain to be analysed: shuff ---------------------------------------- (91) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: shuff(gen_nil:add12_14(n18157_14), gen_nil:add12_14(b)) -> *15_14, rt in Omega(0) Induction Base: shuff(gen_nil:add12_14(0), gen_nil:add12_14(b)) Induction Step: shuff(gen_nil:add12_14(+(n18157_14, 1)), gen_nil:add12_14(b)) ->_R^Omega(0) if(null(gen_nil:add12_14(+(n18157_14, 1))), gen_nil:add12_14(+(n18157_14, 1)), gen_nil:add12_14(b), app(gen_nil:add12_14(b), add(head(gen_nil:add12_14(+(n18157_14, 1))), nil))) ->_R^Omega(0) if(false, gen_nil:add12_14(+(1, n18157_14)), gen_nil:add12_14(b), app(gen_nil:add12_14(b), add(head(gen_nil:add12_14(+(1, n18157_14))), nil))) ->_R^Omega(0) if(false, gen_nil:add12_14(+(1, n18157_14)), gen_nil:add12_14(b), app(gen_nil:add12_14(b), add(hole_head3_14, nil))) ->_L^Omega(0) if(false, gen_nil:add12_14(+(1, n18157_14)), gen_nil:add12_14(+(0, 1)), gen_nil:add12_14(+(b, +(0, 1)))) ->_R^Omega(0) shuff(reverse(tail(gen_nil:add12_14(+(1, n18157_14)))), gen_nil:add12_14(+(1, b))) ->_R^Omega(0) shuff(reverse(gen_nil:add12_14(n18157_14)), gen_nil:add12_14(+(1, b))) ->_L^Omega(0) shuff(gen_nil:add12_14(n18157_14), gen_nil:add12_14(+(1, b))) ->_IH *15_14 We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (92) BOUNDS(1, INF)