MAYBE proof of input_M45Ufeizzo.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) InliningProof [UPPER BOUND(ID), 100 ms] (16) CpxRNTS (17) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 77 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 59 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 2731 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 490 ms] (32) CpxRNTS (33) CompletionProof [UPPER BOUND(ID), 0 ms] (34) CpxTypedWeightedCompleteTrs (35) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (38) CdtProblem (39) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (40) CdtProblem (41) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (42) CdtProblem (43) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CdtProblem (45) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CdtProblem (47) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CdtProblem (49) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (50) CdtProblem (51) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 1 ms] (52) CdtProblem (53) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (54) CdtProblem ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). 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)) -> cons(x, 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) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). 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)) -> cons(x, 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 ---------------------------------------- (3) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (4) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). 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)) -> cons(x, 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 ---------------------------------------- (5) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> cons(x, l) [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> cons(x, l) [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] The TRS has the following type information: is_empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: hd -> nil:cons -> nil:cons false :: true:false hd :: nil:cons -> hd tl :: nil:cons -> nil:cons append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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: hd_1 append_2 ifappend_3 (c) The following functions are completely defined: is_empty_1 tl_1 Due to the following rules being added: tl(v0) -> nil [0] And the following fresh constants: const ---------------------------------------- (10) 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: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> cons(x, l) [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] tl(v0) -> nil [0] The TRS has the following type information: is_empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: hd -> nil:cons -> nil:cons false :: true:false hd :: nil:cons -> hd tl :: nil:cons -> nil:cons append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons const :: hd Rewrite Strategy: INNERMOST ---------------------------------------- (11) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (12) 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: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> cons(x, l) [1] append(nil, l2) -> ifappend(nil, l2, true) [2] append(cons(x', l'), l2) -> ifappend(cons(x', l'), l2, false) [2] ifappend(l1, l2, true) -> l2 [1] ifappend(cons(x'', l''), l2, false) -> cons(hd(cons(x'', l'')), append(cons(x'', l''), l2)) [2] ifappend(l1, l2, false) -> cons(hd(l1), append(nil, l2)) [1] tl(v0) -> nil [0] The TRS has the following type information: is_empty :: nil:cons -> true:false nil :: nil:cons true :: true:false cons :: hd -> nil:cons -> nil:cons false :: true:false hd :: nil:cons -> hd tl :: nil:cons -> nil:cons append :: nil:cons -> nil:cons -> nil:cons ifappend :: nil:cons -> nil:cons -> true:false -> nil:cons const :: hd Rewrite Strategy: INNERMOST ---------------------------------------- (13) 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 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, l2, 1) :|: z' = l2, z = 0, l2 >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', l2, 0) :|: x' >= 0, l' >= 0, z' = l2, l2 >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> l2 :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1 ifappend(z, z', z'') -{ 1 }-> 1 + hd(l1) + append(0, l2) :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0 ifappend(z, z', z'') -{ 2 }-> 1 + hd(1 + x'' + l'') + append(1 + x'' + l'', l2) :|: z'' = 0, l'' >= 0, z' = l2, x'' >= 0, l2 >= 0, z = 1 + x'' + l'' is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l ---------------------------------------- (15) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, l2, 1) :|: z' = l2, z = 0, l2 >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', l2, 0) :|: x' >= 0, l' >= 0, z' = l2, l2 >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> l2 :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, l2) :|: z'' = 0, z = l1, z' = l2, l1 >= 0, l2 >= 0, x >= 0, l >= 0, l1 = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', l2) :|: z'' = 0, l'' >= 0, z' = l2, x'' >= 0, l2 >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l ---------------------------------------- (17) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l ---------------------------------------- (19) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { is_empty } { ifappend, append } { tl } { hd } ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd} ---------------------------------------- (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: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd} ---------------------------------------- (23) 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: 1 ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {is_empty}, {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: ?, size: O(1) [1] ---------------------------------------- (25) 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: 1 ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (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: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: ifappend after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? Computed SIZE bound using CoFloCo for: append after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: ?, size: INF append: runtime: ?, size: INF ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: ifappend after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 2 }-> ifappend(0, z', 1) :|: z = 0, z' >= 0 append(z, z') -{ 2 }-> ifappend(1 + x' + l', z', 0) :|: x' >= 0, l' >= 0, z' >= 0, z = 1 + x' + l' hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 1 }-> z' :|: z >= 0, z' >= 0, z'' = 1 ifappend(z, z', z'') -{ 2 }-> 1 + x + append(0, z') :|: z'' = 0, z >= 0, z' >= 0, x >= 0, l >= 0, z = 1 + x + l ifappend(z, z', z'') -{ 3 }-> 1 + x + append(1 + x'' + l'', z') :|: z'' = 0, l'' >= 0, x'' >= 0, z' >= 0, z = 1 + x'' + l'', x >= 0, l >= 0, 1 + x'' + l'' = 1 + x + l is_empty(z) -{ 1 }-> 1 :|: z = 0 is_empty(z) -{ 1 }-> 0 :|: x >= 0, l >= 0, z = 1 + x + l tl(z) -{ 0 }-> 0 :|: z >= 0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Function symbols to be analyzed: {ifappend,append}, {tl}, {hd} Previous analysis results are: is_empty: runtime: O(1) [1], size: O(1) [1] ifappend: runtime: INF, size: INF append: runtime: ?, size: INF ---------------------------------------- (33) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: hd(v0) -> null_hd [0] tl(v0) -> null_tl [0] is_empty(v0) -> null_is_empty [0] ifappend(v0, v1, v2) -> null_ifappend [0] And the following fresh constants: null_hd, null_tl, null_is_empty, null_ifappend ---------------------------------------- (34) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: is_empty(nil) -> true [1] is_empty(cons(x, l)) -> false [1] hd(cons(x, l)) -> x [1] tl(cons(x, l)) -> cons(x, l) [1] append(l1, l2) -> ifappend(l1, l2, is_empty(l1)) [1] ifappend(l1, l2, true) -> l2 [1] ifappend(l1, l2, false) -> cons(hd(l1), append(tl(l1), l2)) [1] hd(v0) -> null_hd [0] tl(v0) -> null_tl [0] is_empty(v0) -> null_is_empty [0] ifappend(v0, v1, v2) -> null_ifappend [0] The TRS has the following type information: is_empty :: nil:cons:null_tl:null_ifappend -> true:false:null_is_empty nil :: nil:cons:null_tl:null_ifappend true :: true:false:null_is_empty cons :: null_hd -> nil:cons:null_tl:null_ifappend -> nil:cons:null_tl:null_ifappend false :: true:false:null_is_empty hd :: nil:cons:null_tl:null_ifappend -> null_hd tl :: nil:cons:null_tl:null_ifappend -> nil:cons:null_tl:null_ifappend append :: nil:cons:null_tl:null_ifappend -> nil:cons:null_tl:null_ifappend -> nil:cons:null_tl:null_ifappend ifappend :: nil:cons:null_tl:null_ifappend -> nil:cons:null_tl:null_ifappend -> true:false:null_is_empty -> nil:cons:null_tl:null_ifappend null_hd :: null_hd null_tl :: nil:cons:null_tl:null_ifappend null_is_empty :: true:false:null_is_empty null_ifappend :: nil:cons:null_tl:null_ifappend Rewrite Strategy: INNERMOST ---------------------------------------- (35) 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 => 2 false => 1 null_hd => 0 null_tl => 0 null_is_empty => 0 null_ifappend => 0 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: append(z, z') -{ 1 }-> ifappend(l1, l2, is_empty(l1)) :|: z = l1, z' = l2, l1 >= 0, l2 >= 0 hd(z) -{ 1 }-> x :|: x >= 0, l >= 0, z = 1 + x + l hd(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 ifappend(z, z', z'') -{ 1 }-> l2 :|: z = l1, z' = l2, z'' = 2, l1 >= 0, l2 >= 0 ifappend(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 ifappend(z, z', z'') -{ 1 }-> 1 + hd(l1) + append(tl(l1), l2) :|: z = l1, z' = l2, l1 >= 0, l2 >= 0, z'' = 1 is_empty(z) -{ 1 }-> 2 :|: z = 0 is_empty(z) -{ 1 }-> 1 :|: x >= 0, l >= 0, z = 1 + x + l is_empty(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 1 }-> 1 + x + l :|: x >= 0, l >= 0, z = 1 + x + l Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (37) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (38) 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)) -> cons(z0, 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 ---------------------------------------- (39) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing nodes: IS_EMPTY(cons(z0, z1)) -> c1 HD(cons(z0, z1)) -> c2 IFAPPEND(z0, z1, false) -> c6(HD(z0)) IFAPPEND(z0, z1, true) -> c5 IS_EMPTY(nil) -> c TL(cons(z0, z1)) -> c3 ---------------------------------------- (40) 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)) -> cons(z0, 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 ---------------------------------------- (41) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (42) 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)) -> cons(z0, 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 ---------------------------------------- (43) 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)) ---------------------------------------- (44) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false tl(cons(z0, z1)) -> cons(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, tl_1 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c7_1 ---------------------------------------- (45) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace APPEND(z0, z1) -> c4(IFAPPEND(z0, z1, is_empty(z0))) by APPEND(nil, x1) -> c4(IFAPPEND(nil, x1, true)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false tl(cons(z0, z1)) -> cons(z0, z1) Tuples: IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) APPEND(nil, x1) -> c4(IFAPPEND(nil, x1, true)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) S tuples: IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) APPEND(nil, x1) -> c4(IFAPPEND(nil, x1, true)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) K tuples:none Defined Rule Symbols: is_empty_1, tl_1 Defined Pair Symbols: IFAPPEND_3, APPEND_2 Compound Symbols: c7_1, c4_1 ---------------------------------------- (47) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: APPEND(nil, x1) -> c4(IFAPPEND(nil, x1, true)) ---------------------------------------- (48) Obligation: Complexity Dependency Tuples Problem Rules: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false tl(cons(z0, z1)) -> cons(z0, z1) Tuples: IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) S tuples: IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) K tuples:none Defined Rule Symbols: is_empty_1, tl_1 Defined Pair Symbols: IFAPPEND_3, APPEND_2 Compound Symbols: c7_1, c4_1 ---------------------------------------- (49) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false ---------------------------------------- (50) Obligation: Complexity Dependency Tuples Problem Rules: tl(cons(z0, z1)) -> cons(z0, z1) Tuples: IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) S tuples: IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) K tuples:none Defined Rule Symbols: tl_1 Defined Pair Symbols: IFAPPEND_3, APPEND_2 Compound Symbols: c7_1, c4_1 ---------------------------------------- (51) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace IFAPPEND(z0, z1, false) -> c7(APPEND(tl(z0), z1)) by IFAPPEND(cons(z0, z1), x1, false) -> c7(APPEND(cons(z0, z1), x1)) ---------------------------------------- (52) Obligation: Complexity Dependency Tuples Problem Rules: tl(cons(z0, z1)) -> cons(z0, z1) Tuples: APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) IFAPPEND(cons(z0, z1), x1, false) -> c7(APPEND(cons(z0, z1), x1)) S tuples: APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) IFAPPEND(cons(z0, z1), x1, false) -> c7(APPEND(cons(z0, z1), x1)) K tuples:none Defined Rule Symbols: tl_1 Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c7_1 ---------------------------------------- (53) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: tl(cons(z0, z1)) -> cons(z0, z1) ---------------------------------------- (54) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) IFAPPEND(cons(z0, z1), x1, false) -> c7(APPEND(cons(z0, z1), x1)) S tuples: APPEND(cons(z0, z1), x1) -> c4(IFAPPEND(cons(z0, z1), x1, false)) IFAPPEND(cons(z0, z1), x1, false) -> c7(APPEND(cons(z0, z1), x1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: APPEND_2, IFAPPEND_3 Compound Symbols: c4_1, c7_1