WORST_CASE(Omega(n^1),O(n^1)) proof of input_SsbNDRYmeB.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CdtProblem (9) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxWeightedTrs (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTypedWeightedTrs (15) CompletionProof [UPPER BOUND(ID), 0 ms] (16) CpxTypedWeightedCompleteTrs (17) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxTypedWeightedCompleteTrs (19) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (20) CpxRNTS (21) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (22) CpxRNTS (23) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (24) CpxRNTS (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 191 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 3 ms] (30) CpxRNTS (31) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 759 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 273 ms] (36) CpxRNTS (37) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (38) CpxRNTS (39) IntTrsBoundProof [UPPER BOUND(ID), 147 ms] (40) CpxRNTS (41) IntTrsBoundProof [UPPER BOUND(ID), 32 ms] (42) CpxRNTS (43) FinalProof [FINISHED, 0 ms] (44) BOUNDS(1, n^1) (45) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CdtProblem (47) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CpxRelTRS (49) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (50) CpxRelTRS (51) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (52) typed CpxTrs (53) OrderProof [LOWER BOUND(ID), 21 ms] (54) typed CpxTrs (55) RewriteLemmaProof [LOWER BOUND(ID), 755 ms] (56) BEST (57) proven lower bound (58) LowerBoundPropagationProof [FINISHED, 0 ms] (59) BOUNDS(n^1, INF) (60) typed CpxTrs (61) RewriteLemmaProof [LOWER BOUND(ID), 79 ms] (62) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: is_empty(nil) -> true is_empty(cons(x, l)) -> false hd(cons(x, l)) -> x tl(cons(x, l)) -> l append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) ifappend(l1, l2, true) -> l2 ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) S tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: IS_EMPTY_1, HD_1, TL_1, APPEND_2, IFAPPEND_3 Compound Symbols: c, c1, c2, c3, c4_2, c5, c6_1, c7_2 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing nodes: IS_EMPTY(cons(z0, z1)) -> c1 IFAPPEND(z0, z1, false) -> c6(HD(z0)) HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 IFAPPEND(z0, z1, true) -> c5 IS_EMPTY(nil) -> c ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_2, c7_2 ---------------------------------------- (5) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c7_1 ---------------------------------------- (7) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: hd(cons(z0, z1)) -> z0 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) ---------------------------------------- (8) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false tl(cons(z0, z1)) -> z1 Tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) S tuples: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) K tuples:none Defined Rule Symbols: is_empty_1, tl_1 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c7_1 ---------------------------------------- (9) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) The (relative) TRS S consists of the following rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false tl(cons(z0, z1)) -> z1 Rewrite Strategy: INNERMOST ---------------------------------------- (11) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) [1] IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) [1] is_empty(nil) -> true [0] is_empty(cons(z0, z1)) -> false [0] tl(cons(z0, z1)) -> z1 [0] Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) [1] IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) [1] is_empty(nil) -> true [0] is_empty(cons(z0, z1)) -> false [0] tl(cons(z0, z1)) -> z1 [0] The TRS has the following type information: APPEND :: nil:cons -> a -> c4 c4 :: c7 -> c4 IFAPPEND :: nil:cons -> a -> false:true -> c7 is_empty :: nil:cons -> false:true false :: false:true c7 :: c4 -> c7 tl :: nil:cons -> nil:cons nil :: nil:cons true :: false:true cons :: b -> nil:cons -> nil:cons Rewrite Strategy: INNERMOST ---------------------------------------- (15) 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: APPEND_2 IFAPPEND_3 (c) The following functions are completely defined: is_empty_1 tl_1 Due to the following rules being added: is_empty(v0) -> null_is_empty [0] tl(v0) -> nil [0] And the following fresh constants: null_is_empty, const, const1, const2, const3 ---------------------------------------- (16) 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: APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) [1] IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) [1] is_empty(nil) -> true [0] is_empty(cons(z0, z1)) -> false [0] tl(cons(z0, z1)) -> z1 [0] is_empty(v0) -> null_is_empty [0] tl(v0) -> nil [0] The TRS has the following type information: APPEND :: nil:cons -> a -> c4 c4 :: c7 -> c4 IFAPPEND :: nil:cons -> a -> false:true:null_is_empty -> c7 is_empty :: nil:cons -> false:true:null_is_empty false :: false:true:null_is_empty c7 :: c4 -> c7 tl :: nil:cons -> nil:cons nil :: nil:cons true :: false:true:null_is_empty cons :: b -> nil:cons -> nil:cons null_is_empty :: false:true:null_is_empty const :: c4 const1 :: a const2 :: c7 const3 :: b Rewrite Strategy: INNERMOST ---------------------------------------- (17) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (18) 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: APPEND(nil, z1) -> c4(IFAPPEND(nil, z1, true)) [1] APPEND(cons(z0', z1'), z1) -> c4(IFAPPEND(cons(z0', z1'), z1, false)) [1] APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, null_is_empty)) [1] IFAPPEND(cons(z0'', z1''), z1, false) -> c7(APPEND(z1'', z1)) [1] IFAPPEND(z0, z1, false) -> c7(APPEND(nil, z1)) [1] is_empty(nil) -> true [0] is_empty(cons(z0, z1)) -> false [0] tl(cons(z0, z1)) -> z1 [0] is_empty(v0) -> null_is_empty [0] tl(v0) -> nil [0] The TRS has the following type information: APPEND :: nil:cons -> a -> c4 c4 :: c7 -> c4 IFAPPEND :: nil:cons -> a -> false:true:null_is_empty -> c7 is_empty :: nil:cons -> false:true:null_is_empty false :: false:true:null_is_empty c7 :: c4 -> c7 tl :: nil:cons -> nil:cons nil :: nil:cons true :: false:true:null_is_empty cons :: b -> nil:cons -> nil:cons null_is_empty :: false:true:null_is_empty const :: c4 const1 :: a const2 :: c7 const3 :: b Rewrite Strategy: INNERMOST ---------------------------------------- (19) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: false => 1 nil => 0 true => 2 null_is_empty => 0 const => 0 const1 => 0 const2 => 0 const3 => 0 ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z0, z1, 0) :|: z = z0, z1 >= 0, z' = z1, z0 >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z1, 2) :|: z1 >= 0, z' = z1, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z1, 1) :|: z1 >= 0, z0' >= 0, z1' >= 0, z' = z1, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z1) :|: z = 1 + z0'' + z1'', z1 >= 0, z' = z1, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z1) :|: z = z0, z1 >= 0, z' = z1, z0 >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ---------------------------------------- (21) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 ---------------------------------------- (23) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { is_empty } { IFAPPEND, APPEND } { tl } ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {is_empty}, {IFAPPEND,APPEND}, {tl} ---------------------------------------- (25) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {is_empty}, {IFAPPEND,APPEND}, {tl} ---------------------------------------- (27) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: is_empty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 2 ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {is_empty}, {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: ?, size: O(1) [2] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: is_empty after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (31) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: IFAPPEND after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 Computed SIZE bound using CoFloCo for: APPEND after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 1 ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] IFAPPEND: runtime: ?, size: O(1) [0] APPEND: runtime: ?, size: O(1) [1] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: IFAPPEND after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 4 + 2*z Computed RUNTIME bound using CoFloCo for: APPEND after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 5 + 2*z ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z, z', 0) :|: z' >= 0, z >= 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(0, z', 2) :|: z' >= 0, z = 0 APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(1 + z0' + z1', z', 1) :|: z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(0, z') :|: z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] IFAPPEND: runtime: O(n^1) [4 + 2*z], size: O(1) [0] APPEND: runtime: O(n^1) [5 + 2*z], size: O(1) [1] ---------------------------------------- (37) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 5 }-> 1 + s :|: s >= 0, s <= 0, z' >= 0, z = 0 APPEND(z, z') -{ 7 + 2*z0' + 2*z1' }-> 1 + s' :|: s' >= 0, s' <= 0, z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' APPEND(z, z') -{ 5 + 2*z }-> 1 + s'' :|: s'' >= 0, s'' <= 0, z' >= 0, z >= 0 IFAPPEND(z, z', z'') -{ 6 + 2*z1'' }-> 1 + s1 :|: s1 >= 0, s1 <= 1, z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 6 }-> 1 + s2 :|: s2 >= 0, s2 <= 1, z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] IFAPPEND: runtime: O(n^1) [4 + 2*z], size: O(1) [0] APPEND: runtime: O(n^1) [5 + 2*z], size: O(1) [1] ---------------------------------------- (39) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: tl after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 5 }-> 1 + s :|: s >= 0, s <= 0, z' >= 0, z = 0 APPEND(z, z') -{ 7 + 2*z0' + 2*z1' }-> 1 + s' :|: s' >= 0, s' <= 0, z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' APPEND(z, z') -{ 5 + 2*z }-> 1 + s'' :|: s'' >= 0, s'' <= 0, z' >= 0, z >= 0 IFAPPEND(z, z', z'') -{ 6 + 2*z1'' }-> 1 + s1 :|: s1 >= 0, s1 <= 1, z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 6 }-> 1 + s2 :|: s2 >= 0, s2 <= 1, z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] IFAPPEND: runtime: O(n^1) [4 + 2*z], size: O(1) [0] APPEND: runtime: O(n^1) [5 + 2*z], size: O(1) [1] tl: runtime: ?, size: O(n^1) [z] ---------------------------------------- (41) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: tl after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (42) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 5 }-> 1 + s :|: s >= 0, s <= 0, z' >= 0, z = 0 APPEND(z, z') -{ 7 + 2*z0' + 2*z1' }-> 1 + s' :|: s' >= 0, s' <= 0, z' >= 0, z0' >= 0, z1' >= 0, z = 1 + z0' + z1' APPEND(z, z') -{ 5 + 2*z }-> 1 + s'' :|: s'' >= 0, s'' <= 0, z' >= 0, z >= 0 IFAPPEND(z, z', z'') -{ 6 + 2*z1'' }-> 1 + s1 :|: s1 >= 0, s1 <= 1, z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 IFAPPEND(z, z', z'') -{ 6 }-> 1 + s2 :|: s2 >= 0, s2 <= 1, z' >= 0, z >= 0, z'' = 1 is_empty(z) -{ 0 }-> 2 :|: z = 0 is_empty(z) -{ 0 }-> 1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 is_empty(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 tl(z) -{ 0 }-> 0 :|: z >= 0 Function symbols to be analyzed: Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] IFAPPEND: runtime: O(n^1) [4 + 2*z], size: O(1) [0] APPEND: runtime: O(n^1) [5 + 2*z], size: O(1) [1] tl: runtime: O(1) [0], size: O(n^1) [z] ---------------------------------------- (43) FinalProof (FINISHED) Computed overall runtime complexity ---------------------------------------- (44) BOUNDS(1, n^1) ---------------------------------------- (45) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) S tuples: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) K tuples:none Defined Rule Symbols: is_empty_1, hd_1, tl_1, append_2, ifappend_3 Defined Pair Symbols: IS_EMPTY_1, HD_1, TL_1, APPEND_2, IFAPPEND_3 Compound Symbols: c, c1, c2, c3, c4_2, c5, c6_1, c7_2 ---------------------------------------- (47) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (48) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) The (relative) TRS S consists of the following rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Rewrite Strategy: INNERMOST ---------------------------------------- (49) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (50) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) The (relative) TRS S consists of the following rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Rewrite Strategy: INNERMOST ---------------------------------------- (51) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (52) Obligation: Innermost TRS: Rules: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Types: IS_EMPTY :: nil:cons -> c:c1 nil :: nil:cons c :: c:c1 cons :: hd -> nil:cons -> nil:cons c1 :: c:c1 HD :: nil:cons -> c2 c2 :: c2 TL :: nil:cons -> c3 c3 :: c3 APPEND :: nil:cons -> a -> c4 c4 :: c5:c6:c7 -> c:c1 -> c4 IFAPPEND :: nil:cons -> a -> true:false -> c5:c6:c7 is_empty :: nil:cons -> true:false true :: true:false c5 :: c5:c6:c7 false :: true:false c6 :: c2 -> c5:c6:c7 c7 :: c4 -> c3 -> c5:c6:c7 tl :: nil:cons -> nil:cons hd :: nil:cons -> hd append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons hole_c:c11_8 :: c:c1 hole_nil:cons2_8 :: nil:cons hole_hd3_8 :: hd hole_c24_8 :: c2 hole_c35_8 :: c3 hole_c46_8 :: c4 hole_a7_8 :: a hole_c5:c6:c78_8 :: c5:c6:c7 hole_true:false9_8 :: true:false gen_nil:cons10_8 :: Nat -> nil:cons ---------------------------------------- (53) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: APPEND, append ---------------------------------------- (54) Obligation: Innermost TRS: Rules: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Types: IS_EMPTY :: nil:cons -> c:c1 nil :: nil:cons c :: c:c1 cons :: hd -> nil:cons -> nil:cons c1 :: c:c1 HD :: nil:cons -> c2 c2 :: c2 TL :: nil:cons -> c3 c3 :: c3 APPEND :: nil:cons -> a -> c4 c4 :: c5:c6:c7 -> c:c1 -> c4 IFAPPEND :: nil:cons -> a -> true:false -> c5:c6:c7 is_empty :: nil:cons -> true:false true :: true:false c5 :: c5:c6:c7 false :: true:false c6 :: c2 -> c5:c6:c7 c7 :: c4 -> c3 -> c5:c6:c7 tl :: nil:cons -> nil:cons hd :: nil:cons -> hd append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons hole_c:c11_8 :: c:c1 hole_nil:cons2_8 :: nil:cons hole_hd3_8 :: hd hole_c24_8 :: c2 hole_c35_8 :: c3 hole_c46_8 :: c4 hole_a7_8 :: a hole_c5:c6:c78_8 :: c5:c6:c7 hole_true:false9_8 :: true:false gen_nil:cons10_8 :: Nat -> nil:cons Generator Equations: gen_nil:cons10_8(0) <=> nil gen_nil:cons10_8(+(x, 1)) <=> cons(hole_hd3_8, gen_nil:cons10_8(x)) The following defined symbols remain to be analysed: APPEND, append ---------------------------------------- (55) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: APPEND(gen_nil:cons10_8(n12_8), hole_a7_8) -> *11_8, rt in Omega(n12_8) Induction Base: APPEND(gen_nil:cons10_8(0), hole_a7_8) Induction Step: APPEND(gen_nil:cons10_8(+(n12_8, 1)), hole_a7_8) ->_R^Omega(1) c4(IFAPPEND(gen_nil:cons10_8(+(n12_8, 1)), hole_a7_8, is_empty(gen_nil:cons10_8(+(n12_8, 1)))), IS_EMPTY(gen_nil:cons10_8(+(n12_8, 1)))) ->_R^Omega(0) c4(IFAPPEND(gen_nil:cons10_8(+(1, n12_8)), hole_a7_8, false), IS_EMPTY(gen_nil:cons10_8(+(1, n12_8)))) ->_R^Omega(1) c4(c7(APPEND(tl(gen_nil:cons10_8(+(1, n12_8))), hole_a7_8), TL(gen_nil:cons10_8(+(1, n12_8)))), IS_EMPTY(gen_nil:cons10_8(+(1, n12_8)))) ->_R^Omega(0) c4(c7(APPEND(gen_nil:cons10_8(n12_8), hole_a7_8), TL(gen_nil:cons10_8(+(1, n12_8)))), IS_EMPTY(gen_nil:cons10_8(+(1, n12_8)))) ->_IH c4(c7(*11_8, TL(gen_nil:cons10_8(+(1, n12_8)))), IS_EMPTY(gen_nil:cons10_8(+(1, n12_8)))) ->_R^Omega(1) c4(c7(*11_8, c3), IS_EMPTY(gen_nil:cons10_8(+(1, n12_8)))) ->_R^Omega(1) c4(c7(*11_8, c3), c1) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (56) Complex Obligation (BEST) ---------------------------------------- (57) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Types: IS_EMPTY :: nil:cons -> c:c1 nil :: nil:cons c :: c:c1 cons :: hd -> nil:cons -> nil:cons c1 :: c:c1 HD :: nil:cons -> c2 c2 :: c2 TL :: nil:cons -> c3 c3 :: c3 APPEND :: nil:cons -> a -> c4 c4 :: c5:c6:c7 -> c:c1 -> c4 IFAPPEND :: nil:cons -> a -> true:false -> c5:c6:c7 is_empty :: nil:cons -> true:false true :: true:false c5 :: c5:c6:c7 false :: true:false c6 :: c2 -> c5:c6:c7 c7 :: c4 -> c3 -> c5:c6:c7 tl :: nil:cons -> nil:cons hd :: nil:cons -> hd append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons hole_c:c11_8 :: c:c1 hole_nil:cons2_8 :: nil:cons hole_hd3_8 :: hd hole_c24_8 :: c2 hole_c35_8 :: c3 hole_c46_8 :: c4 hole_a7_8 :: a hole_c5:c6:c78_8 :: c5:c6:c7 hole_true:false9_8 :: true:false gen_nil:cons10_8 :: Nat -> nil:cons Generator Equations: gen_nil:cons10_8(0) <=> nil gen_nil:cons10_8(+(x, 1)) <=> cons(hole_hd3_8, gen_nil:cons10_8(x)) The following defined symbols remain to be analysed: APPEND, append ---------------------------------------- (58) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (59) BOUNDS(n^1, INF) ---------------------------------------- (60) Obligation: Innermost TRS: Rules: IS_EMPTY(nil) -> c IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0)), IS_EMPTY(z0)) IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1), TL(z0)) is_empty(nil) -> true is_empty(cons(z0, z1)) -> false hd(cons(z0, z1)) -> z0 tl(cons(z0, z1)) -> z1 append(z0, z1) -> ifappend(z0, z1, is_empty(z0)) ifappend(z0, z1, true) -> z1 ifappend(z0, z1, false) -> cons(hd(z0), append(tl(z0), z1)) Types: IS_EMPTY :: nil:cons -> c:c1 nil :: nil:cons c :: c:c1 cons :: hd -> nil:cons -> nil:cons c1 :: c:c1 HD :: nil:cons -> c2 c2 :: c2 TL :: nil:cons -> c3 c3 :: c3 APPEND :: nil:cons -> a -> c4 c4 :: c5:c6:c7 -> c:c1 -> c4 IFAPPEND :: nil:cons -> a -> true:false -> c5:c6:c7 is_empty :: nil:cons -> true:false true :: true:false c5 :: c5:c6:c7 false :: true:false c6 :: c2 -> c5:c6:c7 c7 :: c4 -> c3 -> c5:c6:c7 tl :: nil:cons -> nil:cons hd :: nil:cons -> hd append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons hole_c:c11_8 :: c:c1 hole_nil:cons2_8 :: nil:cons hole_hd3_8 :: hd hole_c24_8 :: c2 hole_c35_8 :: c3 hole_c46_8 :: c4 hole_a7_8 :: a hole_c5:c6:c78_8 :: c5:c6:c7 hole_true:false9_8 :: true:false gen_nil:cons10_8 :: Nat -> nil:cons Lemmas: APPEND(gen_nil:cons10_8(n12_8), hole_a7_8) -> *11_8, rt in Omega(n12_8) Generator Equations: gen_nil:cons10_8(0) <=> nil gen_nil:cons10_8(+(x, 1)) <=> cons(hole_hd3_8, gen_nil:cons10_8(x)) The following defined symbols remain to be analysed: append ---------------------------------------- (61) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: append(gen_nil:cons10_8(n1460_8), gen_nil:cons10_8(b)) -> gen_nil:cons10_8(+(n1460_8, b)), rt in Omega(0) Induction Base: append(gen_nil:cons10_8(0), gen_nil:cons10_8(b)) ->_R^Omega(0) ifappend(gen_nil:cons10_8(0), gen_nil:cons10_8(b), is_empty(gen_nil:cons10_8(0))) ->_R^Omega(0) ifappend(gen_nil:cons10_8(0), gen_nil:cons10_8(b), true) ->_R^Omega(0) gen_nil:cons10_8(b) Induction Step: append(gen_nil:cons10_8(+(n1460_8, 1)), gen_nil:cons10_8(b)) ->_R^Omega(0) ifappend(gen_nil:cons10_8(+(n1460_8, 1)), gen_nil:cons10_8(b), is_empty(gen_nil:cons10_8(+(n1460_8, 1)))) ->_R^Omega(0) ifappend(gen_nil:cons10_8(+(1, n1460_8)), gen_nil:cons10_8(b), false) ->_R^Omega(0) cons(hd(gen_nil:cons10_8(+(1, n1460_8))), append(tl(gen_nil:cons10_8(+(1, n1460_8))), gen_nil:cons10_8(b))) ->_R^Omega(0) cons(hole_hd3_8, append(tl(gen_nil:cons10_8(+(1, n1460_8))), gen_nil:cons10_8(b))) ->_R^Omega(0) cons(hole_hd3_8, append(gen_nil:cons10_8(n1460_8), gen_nil:cons10_8(b))) ->_IH cons(hole_hd3_8, gen_nil:cons10_8(+(b, c1461_8))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (62) BOUNDS(1, INF)