MAYBE proof of input_RoruFCdj7C.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) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxRelTRS (9) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxRelTRS (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) typed CpxTrs (13) OrderProof [LOWER BOUND(ID), 4 ms] (14) typed CpxTrs (15) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (16) TRS for Loop Detection (17) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (18) CdtProblem (19) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CdtProblem (21) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (22) CdtProblem (23) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (24) CdtProblem (25) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (26) CpxRelTRS (27) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (28) CpxTRS (29) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (30) CpxWeightedTrs (31) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (32) CpxTypedWeightedTrs (33) CompletionProof [UPPER BOUND(ID), 0 ms] (34) CpxTypedWeightedCompleteTrs (35) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) CompletionProof [UPPER BOUND(ID), 0 ms] (38) CpxTypedWeightedCompleteTrs (39) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (40) CpxTypedWeightedCompleteTrs (41) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (42) CpxRNTS (43) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CpxRNTS (45) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CpxRNTS (47) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (48) CpxRNTS (49) IntTrsBoundProof [UPPER BOUND(ID), 80 ms] (50) CpxRNTS (51) IntTrsBoundProof [UPPER BOUND(ID), 5 ms] (52) CpxRNTS (53) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (54) CpxRNTS (55) IntTrsBoundProof [UPPER BOUND(ID), 1450 ms] (56) CpxRNTS (57) IntTrsBoundProof [UPPER BOUND(ID), 507 ms] (58) CpxRNTS (59) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (60) CdtProblem (61) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (62) CdtProblem (63) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (64) CdtProblem (65) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (66) CdtProblem (67) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (68) CdtProblem (69) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (70) CpxWeightedTrs (71) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (72) CpxTypedWeightedTrs (73) CompletionProof [UPPER BOUND(ID), 0 ms] (74) CpxTypedWeightedCompleteTrs (75) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (76) CpxTypedWeightedCompleteTrs (77) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (78) CpxRNTS (79) InliningProof [UPPER BOUND(ID), 71 ms] (80) CpxRNTS (81) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (82) CpxRNTS (83) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (84) CpxRNTS (85) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (86) CpxRNTS (87) IntTrsBoundProof [UPPER BOUND(ID), 136 ms] (88) CpxRNTS (89) IntTrsBoundProof [UPPER BOUND(ID), 58 ms] (90) CpxRNTS (91) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (92) CpxRNTS (93) IntTrsBoundProof [UPPER BOUND(ID), 2978 ms] (94) CpxRNTS (95) IntTrsBoundProof [UPPER BOUND(ID), 488 ms] (96) CpxRNTS (97) CompletionProof [UPPER BOUND(ID), 0 ms] (98) CpxTypedWeightedCompleteTrs (99) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (100) CpxRNTS ---------------------------------------- (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) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (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)) -> 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 ---------------------------------------- (7) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(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)) -> 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)) Rewrite Strategy: INNERMOST ---------------------------------------- (9) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(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)) -> 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)) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) 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)) -> 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)) 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 ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: APPEND, append ---------------------------------------- (14) 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)) -> 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)) 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 ---------------------------------------- (15) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (16) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(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)) -> 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)) Rewrite Strategy: INNERMOST ---------------------------------------- (17) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (18) 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 ---------------------------------------- (19) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 6 trailing nodes: IS_EMPTY(cons(z0, z1)) -> c1 IFAPPEND(z0, z1, true) -> c5 IFAPPEND(z0, z1, false) -> c6(HD(z0)) HD(cons(z0, z1)) -> c2 TL(cons(z0, z1)) -> c3 IS_EMPTY(nil) -> c ---------------------------------------- (20) 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 ---------------------------------------- (21) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing tuple parts ---------------------------------------- (22) 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 ---------------------------------------- (23) 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)) ---------------------------------------- (24) 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 ---------------------------------------- (25) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (26) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, INF). 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)) -> cons(z0, z1) Rewrite Strategy: INNERMOST ---------------------------------------- (27) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (28) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). 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)) is_empty(nil) -> true is_empty(cons(z0, z1)) -> false tl(cons(z0, z1)) -> cons(z0, z1) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (29) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (30) 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: 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)) -> cons(z0, z1) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (31) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (32) 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)) -> cons(z0, 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 -> c -> nil:cons Rewrite Strategy: INNERMOST ---------------------------------------- (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: is_empty(v0) -> null_is_empty [0] tl(v0) -> null_tl [0] IFAPPEND(v0, v1, v2) -> null_IFAPPEND [0] And the following fresh constants: null_is_empty, null_tl, null_IFAPPEND, const, const1, const2, const3 ---------------------------------------- (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: 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)) -> cons(z0, z1) [0] is_empty(v0) -> null_is_empty [0] tl(v0) -> null_tl [0] IFAPPEND(v0, v1, v2) -> null_IFAPPEND [0] The TRS has the following type information: APPEND :: nil:cons:null_tl -> a -> c4 c4 :: c7:null_IFAPPEND -> c4 IFAPPEND :: nil:cons:null_tl -> a -> false:true:null_is_empty -> c7:null_IFAPPEND is_empty :: nil:cons:null_tl -> false:true:null_is_empty false :: false:true:null_is_empty c7 :: c4 -> c7:null_IFAPPEND tl :: nil:cons:null_tl -> nil:cons:null_tl nil :: nil:cons:null_tl true :: false:true:null_is_empty cons :: b -> c -> nil:cons:null_tl null_is_empty :: false:true:null_is_empty null_tl :: nil:cons:null_tl null_IFAPPEND :: c7:null_IFAPPEND const :: c4 const1 :: a const2 :: b const3 :: c 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: false => 1 nil => 0 true => 2 null_is_empty => 0 null_tl => 0 null_IFAPPEND => 0 const => 0 const1 => 0 const2 => 0 const3 => 0 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: APPEND(z, z') -{ 1 }-> 1 + IFAPPEND(z0, z1, is_empty(z0)) :|: z = z0, z1 >= 0, z' = z1, z0 >= 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 + APPEND(tl(z0), 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 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (37) 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, const4 ---------------------------------------- (38) 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)) -> cons(z0, 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 -> c -> nil:cons null_is_empty :: false:true:null_is_empty const :: c4 const1 :: a const2 :: c7 const3 :: b const4 :: c Rewrite Strategy: INNERMOST ---------------------------------------- (39) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (40) 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(cons(z0'', 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)) -> cons(z0, 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 -> c -> nil:cons null_is_empty :: false:true:null_is_empty const :: c4 const1 :: a const2 :: c7 const3 :: b const4 :: c Rewrite Strategy: INNERMOST ---------------------------------------- (41) 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 const4 => 0 ---------------------------------------- (42) 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(0, z1) :|: z = z0, z1 >= 0, z' = z1, z0 >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z1) :|: z = 1 + z0'' + z1'', z1 >= 0, z' = z1, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: v0 >= 0, z = v0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 ---------------------------------------- (43) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (44) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 ---------------------------------------- (45) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { is_empty } { IFAPPEND, APPEND } { tl } ---------------------------------------- (46) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Function symbols to be analyzed: {is_empty}, {IFAPPEND,APPEND}, {tl} ---------------------------------------- (47) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (48) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Function symbols to be analyzed: {is_empty}, {IFAPPEND,APPEND}, {tl} ---------------------------------------- (49) 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 ---------------------------------------- (50) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Function symbols to be analyzed: {is_empty}, {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: ?, size: O(1) [2] ---------------------------------------- (51) 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 ---------------------------------------- (52) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Function symbols to be analyzed: {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (53) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (54) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Function symbols to be analyzed: {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] ---------------------------------------- (55) 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 ---------------------------------------- (56) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 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] ---------------------------------------- (57) 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: ? ---------------------------------------- (58) 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(0, z') :|: z' >= 0, z >= 0, z'' = 1 IFAPPEND(z, z', z'') -{ 1 }-> 1 + APPEND(1 + z0'' + z1'', z') :|: z = 1 + z0'' + z1'', z' >= 0, z0'' >= 0, z'' = 1, z1'' >= 0 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 }-> 0 :|: z >= 0 tl(z) -{ 0 }-> 1 + z0 + z1 :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 Function symbols to be analyzed: {IFAPPEND,APPEND}, {tl} Previous analysis results are: is_empty: runtime: O(1) [0], size: O(1) [2] IFAPPEND: runtime: INF, size: O(1) [0] APPEND: runtime: ?, size: O(1) [1] ---------------------------------------- (59) 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)) ---------------------------------------- (60) 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 ---------------------------------------- (61) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing nodes: APPEND(nil, x1) -> c4(IFAPPEND(nil, x1, true)) ---------------------------------------- (62) 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 ---------------------------------------- (63) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: is_empty(nil) -> true is_empty(cons(z0, z1)) -> false ---------------------------------------- (64) 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 ---------------------------------------- (65) 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)) ---------------------------------------- (66) 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 ---------------------------------------- (67) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: tl(cons(z0, z1)) -> cons(z0, z1) ---------------------------------------- (68) 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 ---------------------------------------- (69) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (70) 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 ---------------------------------------- (71) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (72) 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 ---------------------------------------- (73) 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 ---------------------------------------- (74) 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 ---------------------------------------- (75) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (76) 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 ---------------------------------------- (77) 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 ---------------------------------------- (78) 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 ---------------------------------------- (79) 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 ---------------------------------------- (80) 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 ---------------------------------------- (81) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (82) 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 ---------------------------------------- (83) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { is_empty } { ifappend, append } { tl } { hd } ---------------------------------------- (84) 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} ---------------------------------------- (85) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (86) 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} ---------------------------------------- (87) 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 ---------------------------------------- (88) 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] ---------------------------------------- (89) 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 ---------------------------------------- (90) 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] ---------------------------------------- (91) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (92) 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] ---------------------------------------- (93) 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: ? ---------------------------------------- (94) 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 ---------------------------------------- (95) 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: ? ---------------------------------------- (96) 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 ---------------------------------------- (97) 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 ---------------------------------------- (98) 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 ---------------------------------------- (99) 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 ---------------------------------------- (100) 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.