MAYBE proof of input_S9lWiSQEV3.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 [UPPER BOUND(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), 0 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 346 ms] (16) BEST (17) proven lower bound (18) LowerBoundPropagationProof [FINISHED, 0 ms] (19) BOUNDS(n^1, INF) (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 144 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 29 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 28 ms] (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 404 ms] (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 46 ms] (30) BOUNDS(1, INF) (31) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (32) CdtProblem (33) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (34) CdtProblem (35) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (36) CdtProblem (37) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (38) CpxTRS (39) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (40) CpxTRS (41) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (42) CpxWeightedTrs (43) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CpxTypedWeightedTrs (45) CompletionProof [UPPER BOUND(ID), 0 ms] (46) CpxTypedWeightedCompleteTrs (47) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CpxTypedWeightedCompleteTrs (49) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (50) CpxRNTS (51) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (52) CpxRNTS (53) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (54) CpxRNTS (55) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (56) CpxRNTS (57) IntTrsBoundProof [UPPER BOUND(ID), 129 ms] (58) CpxRNTS (59) IntTrsBoundProof [UPPER BOUND(ID), 73 ms] (60) CpxRNTS (61) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (62) CpxRNTS (63) IntTrsBoundProof [UPPER BOUND(ID), 159 ms] (64) CpxRNTS (65) IntTrsBoundProof [UPPER BOUND(ID), 104 ms] (66) CpxRNTS (67) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (68) CpxRNTS (69) IntTrsBoundProof [UPPER BOUND(ID), 479 ms] (70) CpxRNTS (71) IntTrsBoundProof [UPPER BOUND(ID), 174 ms] (72) CpxRNTS (73) CompletionProof [UPPER BOUND(ID), 0 ms] (74) CpxTypedWeightedCompleteTrs (75) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (76) CpxRNTS (77) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 35 ms] (78) CdtProblem (79) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (80) CdtProblem (81) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (82) CdtProblem (83) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (84) CdtProblem (85) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (86) CdtProblem (87) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (88) CdtProblem (89) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (90) CdtProblem (91) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (92) CdtProblem (93) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (94) CdtProblem (95) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (96) CpxWeightedTrs (97) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (98) CpxTypedWeightedTrs (99) CompletionProof [UPPER BOUND(ID), 0 ms] (100) CpxTypedWeightedCompleteTrs (101) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (102) CpxTypedWeightedCompleteTrs (103) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (104) CpxRNTS (105) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (106) CpxRNTS (107) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (108) CpxRNTS (109) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (110) CpxRNTS (111) IntTrsBoundProof [UPPER BOUND(ID), 803 ms] (112) CpxRNTS (113) IntTrsBoundProof [UPPER BOUND(ID), 27 ms] (114) CpxRNTS (115) CompletionProof [UPPER BOUND(ID), 0 ms] (116) CpxTypedWeightedCompleteTrs (117) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (118) 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: eq(0, 0) -> true eq(s(X), s(Y)) -> eq(X, Y) eq(X, Y) -> false inf(X) -> cons(X, inf(s(X))) take(0, X) -> nil take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) length(nil) -> 0 length(cons(X, L)) -> s(length(L)) 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: eq(0', 0') -> true eq(s(X), s(Y)) -> eq(X, Y) eq(X, Y) -> false inf(X) -> cons(X, inf(s(X))) take(0', X) -> nil take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) length(nil) -> 0' length(cons(X, L)) -> s(length(L)) 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: eq(0, 0) -> true eq(s(X), s(Y)) -> eq(X, Y) eq(X, Y) -> false inf(X) -> cons(X, inf(s(X))) take(0, X) -> nil take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) length(nil) -> 0 length(cons(X, L)) -> s(length(L)) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (5) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: eq(0, 0) -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0 length(cons(z0, z1)) -> s(length(z1)) Tuples: EQ(0, 0) -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0, z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S tuples: EQ(0, 0) -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0, z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) K tuples:none Defined Rule Symbols: eq_2, inf_1, take_2, length_1 Defined Pair Symbols: EQ_2, INF_1, TAKE_2, LENGTH_1 Compound Symbols: c, c1_1, c2, c3_1, c4, c5_1, c6, c7_1 ---------------------------------------- (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(n^1, INF). The TRS R consists of the following rules: EQ(0, 0) -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0, z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) The (relative) TRS S consists of the following rules: eq(0, 0) -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0 length(cons(z0, z1)) -> s(length(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(n^1, INF). The TRS R consists of the following rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) The (relative) TRS S consists of the following rules: eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: EQ, INF, TAKE, LENGTH, eq, inf, take, length ---------------------------------------- (14) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: EQ, INF, TAKE, LENGTH, eq, inf, take, length ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8)) -> gen_c:c1:c28_8(n15_8), rt in Omega(1 + n15_8) Induction Base: EQ(gen_0':s9_8(0), gen_0':s9_8(0)) ->_R^Omega(1) c Induction Step: EQ(gen_0':s9_8(+(n15_8, 1)), gen_0':s9_8(+(n15_8, 1))) ->_R^Omega(1) c1(EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8))) ->_IH c1(gen_c:c1:c28_8(c16_8)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (16) Complex Obligation (BEST) ---------------------------------------- (17) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: EQ, INF, TAKE, LENGTH, eq, inf, take, length ---------------------------------------- (18) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (19) BOUNDS(n^1, INF) ---------------------------------------- (20) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Lemmas: EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8)) -> gen_c:c1:c28_8(n15_8), rt in Omega(1 + n15_8) Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: INF, TAKE, LENGTH, eq, inf, take, length ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: TAKE(gen_0':s9_8(n577_8), gen_cons:nil12_8(n577_8)) -> gen_c4:c511_8(n577_8), rt in Omega(1 + n577_8) Induction Base: TAKE(gen_0':s9_8(0), gen_cons:nil12_8(0)) ->_R^Omega(1) c4 Induction Step: TAKE(gen_0':s9_8(+(n577_8, 1)), gen_cons:nil12_8(+(n577_8, 1))) ->_R^Omega(1) c5(TAKE(gen_0':s9_8(n577_8), gen_cons:nil12_8(n577_8))) ->_IH c5(gen_c4:c511_8(c578_8)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Lemmas: EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8)) -> gen_c:c1:c28_8(n15_8), rt in Omega(1 + n15_8) TAKE(gen_0':s9_8(n577_8), gen_cons:nil12_8(n577_8)) -> gen_c4:c511_8(n577_8), rt in Omega(1 + n577_8) Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: LENGTH, eq, inf, take, length ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LENGTH(gen_cons:nil12_8(n1072_8)) -> gen_c6:c713_8(n1072_8), rt in Omega(1 + n1072_8) Induction Base: LENGTH(gen_cons:nil12_8(0)) ->_R^Omega(1) c6 Induction Step: LENGTH(gen_cons:nil12_8(+(n1072_8, 1))) ->_R^Omega(1) c7(LENGTH(gen_cons:nil12_8(n1072_8))) ->_IH c7(gen_c6:c713_8(c1073_8)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Lemmas: EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8)) -> gen_c:c1:c28_8(n15_8), rt in Omega(1 + n15_8) TAKE(gen_0':s9_8(n577_8), gen_cons:nil12_8(n577_8)) -> gen_c4:c511_8(n577_8), rt in Omega(1 + n577_8) LENGTH(gen_cons:nil12_8(n1072_8)) -> gen_c6:c713_8(n1072_8), rt in Omega(1 + n1072_8) Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: eq, inf, take, length ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: eq(gen_0':s9_8(n1529_8), gen_0':s9_8(n1529_8)) -> true, rt in Omega(0) Induction Base: eq(gen_0':s9_8(0), gen_0':s9_8(0)) ->_R^Omega(0) true Induction Step: eq(gen_0':s9_8(+(n1529_8, 1)), gen_0':s9_8(+(n1529_8, 1))) ->_R^Omega(0) eq(gen_0':s9_8(n1529_8), gen_0':s9_8(n1529_8)) ->_IH true We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (26) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Lemmas: EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8)) -> gen_c:c1:c28_8(n15_8), rt in Omega(1 + n15_8) TAKE(gen_0':s9_8(n577_8), gen_cons:nil12_8(n577_8)) -> gen_c4:c511_8(n577_8), rt in Omega(1 + n577_8) LENGTH(gen_cons:nil12_8(n1072_8)) -> gen_c6:c713_8(n1072_8), rt in Omega(1 + n1072_8) eq(gen_0':s9_8(n1529_8), gen_0':s9_8(n1529_8)) -> true, rt in Omega(0) Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: inf, take, length ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: take(gen_0':s9_8(n1993_8), gen_cons:nil12_8(n1993_8)) -> gen_cons:nil12_8(n1993_8), rt in Omega(0) Induction Base: take(gen_0':s9_8(0), gen_cons:nil12_8(0)) ->_R^Omega(0) nil Induction Step: take(gen_0':s9_8(+(n1993_8, 1)), gen_cons:nil12_8(+(n1993_8, 1))) ->_R^Omega(0) cons(0', take(gen_0':s9_8(n1993_8), gen_cons:nil12_8(n1993_8))) ->_IH cons(0', gen_cons:nil12_8(c1994_8)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (28) Obligation: Innermost TRS: Rules: EQ(0', 0') -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0', z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) eq(0', 0') -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0', z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0' length(cons(z0, z1)) -> s(length(z1)) Types: EQ :: 0':s -> 0':s -> c:c1:c2 0' :: 0':s c :: c:c1:c2 s :: 0':s -> 0':s c1 :: c:c1:c2 -> c:c1:c2 c2 :: c:c1:c2 INF :: 0':s -> c3 c3 :: c3 -> c3 TAKE :: 0':s -> cons:nil -> c4:c5 c4 :: c4:c5 cons :: 0':s -> cons:nil -> cons:nil c5 :: c4:c5 -> c4:c5 LENGTH :: cons:nil -> c6:c7 nil :: cons:nil c6 :: c6:c7 c7 :: c6:c7 -> c6:c7 eq :: 0':s -> 0':s -> true:false true :: true:false false :: true:false inf :: 0':s -> cons:nil take :: 0':s -> cons:nil -> cons:nil length :: cons:nil -> 0':s hole_c:c1:c21_8 :: c:c1:c2 hole_0':s2_8 :: 0':s hole_c33_8 :: c3 hole_c4:c54_8 :: c4:c5 hole_cons:nil5_8 :: cons:nil hole_c6:c76_8 :: c6:c7 hole_true:false7_8 :: true:false gen_c:c1:c28_8 :: Nat -> c:c1:c2 gen_0':s9_8 :: Nat -> 0':s gen_c310_8 :: Nat -> c3 gen_c4:c511_8 :: Nat -> c4:c5 gen_cons:nil12_8 :: Nat -> cons:nil gen_c6:c713_8 :: Nat -> c6:c7 Lemmas: EQ(gen_0':s9_8(n15_8), gen_0':s9_8(n15_8)) -> gen_c:c1:c28_8(n15_8), rt in Omega(1 + n15_8) TAKE(gen_0':s9_8(n577_8), gen_cons:nil12_8(n577_8)) -> gen_c4:c511_8(n577_8), rt in Omega(1 + n577_8) LENGTH(gen_cons:nil12_8(n1072_8)) -> gen_c6:c713_8(n1072_8), rt in Omega(1 + n1072_8) eq(gen_0':s9_8(n1529_8), gen_0':s9_8(n1529_8)) -> true, rt in Omega(0) take(gen_0':s9_8(n1993_8), gen_cons:nil12_8(n1993_8)) -> gen_cons:nil12_8(n1993_8), rt in Omega(0) Generator Equations: gen_c:c1:c28_8(0) <=> c gen_c:c1:c28_8(+(x, 1)) <=> c1(gen_c:c1:c28_8(x)) gen_0':s9_8(0) <=> 0' gen_0':s9_8(+(x, 1)) <=> s(gen_0':s9_8(x)) gen_c310_8(0) <=> hole_c33_8 gen_c310_8(+(x, 1)) <=> c3(gen_c310_8(x)) gen_c4:c511_8(0) <=> c4 gen_c4:c511_8(+(x, 1)) <=> c5(gen_c4:c511_8(x)) gen_cons:nil12_8(0) <=> nil gen_cons:nil12_8(+(x, 1)) <=> cons(0', gen_cons:nil12_8(x)) gen_c6:c713_8(0) <=> c6 gen_c6:c713_8(+(x, 1)) <=> c7(gen_c6:c713_8(x)) The following defined symbols remain to be analysed: length ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: length(gen_cons:nil12_8(n2544_8)) -> gen_0':s9_8(n2544_8), rt in Omega(0) Induction Base: length(gen_cons:nil12_8(0)) ->_R^Omega(0) 0' Induction Step: length(gen_cons:nil12_8(+(n2544_8, 1))) ->_R^Omega(0) s(length(gen_cons:nil12_8(n2544_8))) ->_IH s(gen_0':s9_8(c2545_8)) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (30) BOUNDS(1, INF) ---------------------------------------- (31) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (32) Obligation: Complexity Dependency Tuples Problem Rules: eq(0, 0) -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0 length(cons(z0, z1)) -> s(length(z1)) Tuples: EQ(0, 0) -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0, z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S tuples: EQ(0, 0) -> c EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) EQ(z0, z1) -> c2 INF(z0) -> c3(INF(s(z0))) TAKE(0, z0) -> c4 TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(nil) -> c6 LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) K tuples:none Defined Rule Symbols: eq_2, inf_1, take_2, length_1 Defined Pair Symbols: EQ_2, INF_1, TAKE_2, LENGTH_1 Compound Symbols: c, c1_1, c2, c3_1, c4, c5_1, c6, c7_1 ---------------------------------------- (33) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing nodes: TAKE(0, z0) -> c4 EQ(z0, z1) -> c2 LENGTH(nil) -> c6 EQ(0, 0) -> c ---------------------------------------- (34) Obligation: Complexity Dependency Tuples Problem Rules: eq(0, 0) -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0 length(cons(z0, z1)) -> s(length(z1)) Tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) K tuples:none Defined Rule Symbols: eq_2, inf_1, take_2, length_1 Defined Pair Symbols: EQ_2, INF_1, TAKE_2, LENGTH_1 Compound Symbols: c1_1, c3_1, c5_1, c7_1 ---------------------------------------- (35) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: eq(0, 0) -> true eq(s(z0), s(z1)) -> eq(z0, z1) eq(z0, z1) -> false inf(z0) -> cons(z0, inf(s(z0))) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) length(nil) -> 0 length(cons(z0, z1)) -> s(length(z1)) ---------------------------------------- (36) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: EQ_2, INF_1, TAKE_2, LENGTH_1 Compound Symbols: c1_1, c3_1, c5_1, c7_1 ---------------------------------------- (37) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (38) 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: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (39) RelTrsToTrsProof (UPPER BOUND(ID)) transformed relative TRS to TRS ---------------------------------------- (40) 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: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (41) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (42) 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: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) [1] INF(z0) -> c3(INF(s(z0))) [1] TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) [1] LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (43) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (44) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) [1] INF(z0) -> c3(INF(s(z0))) [1] TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) [1] LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) [1] The TRS has the following type information: EQ :: s -> s -> c1 s :: s -> s c1 :: c1 -> c1 INF :: s -> c3 c3 :: c3 -> c3 TAKE :: s -> cons -> c5 cons :: a -> cons -> cons c5 :: c5 -> c5 LENGTH :: cons -> c7 c7 :: c7 -> c7 Rewrite Strategy: INNERMOST ---------------------------------------- (45) 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: EQ_2 INF_1 TAKE_2 LENGTH_1 (c) The following functions are completely defined: none Due to the following rules being added: none And the following fresh constants: const, const1, const2, const3, const4, const5, const6 ---------------------------------------- (46) 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: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) [1] INF(z0) -> c3(INF(s(z0))) [1] TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) [1] LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) [1] The TRS has the following type information: EQ :: s -> s -> c1 s :: s -> s c1 :: c1 -> c1 INF :: s -> c3 c3 :: c3 -> c3 TAKE :: s -> cons -> c5 cons :: a -> cons -> cons c5 :: c5 -> c5 LENGTH :: cons -> c7 c7 :: c7 -> c7 const :: c1 const1 :: s const2 :: c3 const3 :: c5 const4 :: cons const5 :: a const6 :: c7 Rewrite Strategy: INNERMOST ---------------------------------------- (47) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (48) 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: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) [1] INF(z0) -> c3(INF(s(z0))) [1] TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) [1] LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) [1] The TRS has the following type information: EQ :: s -> s -> c1 s :: s -> s c1 :: c1 -> c1 INF :: s -> c3 c3 :: c3 -> c3 TAKE :: s -> cons -> c5 cons :: a -> cons -> cons c5 :: c5 -> c5 LENGTH :: cons -> c7 c7 :: c7 -> c7 const :: c1 const1 :: s const2 :: c3 const3 :: c5 const4 :: cons const5 :: a const6 :: c7 Rewrite Strategy: INNERMOST ---------------------------------------- (49) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: const => 0 const1 => 0 const2 => 0 const3 => 0 const4 => 0 const5 => 0 const6 => 0 ---------------------------------------- (50) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 1 }-> 1 + EQ(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 INF(z) -{ 1 }-> 1 + INF(1 + z0) :|: z = z0, z0 >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z0, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z = 1 + z0, z0 >= 0, z2 >= 0 ---------------------------------------- (51) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (52) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 1 }-> 1 + EQ(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 ---------------------------------------- (53) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { EQ } { TAKE } { INF } { LENGTH } ---------------------------------------- (54) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 1 }-> 1 + EQ(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {EQ}, {TAKE}, {INF}, {LENGTH} ---------------------------------------- (55) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (56) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 1 }-> 1 + EQ(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {EQ}, {TAKE}, {INF}, {LENGTH} ---------------------------------------- (57) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: EQ after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (58) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 1 }-> 1 + EQ(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {EQ}, {TAKE}, {INF}, {LENGTH} Previous analysis results are: EQ: runtime: ?, size: O(1) [0] ---------------------------------------- (59) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: EQ after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (60) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 1 }-> 1 + EQ(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {TAKE}, {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] ---------------------------------------- (61) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (62) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ z' }-> 1 + s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {TAKE}, {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] ---------------------------------------- (63) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: TAKE after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (64) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ z' }-> 1 + s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {TAKE}, {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] TAKE: runtime: ?, size: O(1) [0] ---------------------------------------- (65) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: TAKE after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (66) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ z' }-> 1 + s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z - 1, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] TAKE: runtime: O(n^1) [z'], size: O(1) [0] ---------------------------------------- (67) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (68) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ z' }-> 1 + s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 + z2 }-> 1 + s' :|: s' >= 0, s' <= 0, z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] TAKE: runtime: O(n^1) [z'], size: O(1) [0] ---------------------------------------- (69) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: INF after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (70) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ z' }-> 1 + s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 + z2 }-> 1 + s' :|: s' >= 0, s' <= 0, z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] TAKE: runtime: O(n^1) [z'], size: O(1) [0] INF: runtime: ?, size: O(1) [0] ---------------------------------------- (71) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: INF after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (72) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ z' }-> 1 + s :|: s >= 0, s <= 0, z' - 1 >= 0, z - 1 >= 0 INF(z) -{ 1 }-> 1 + INF(1 + z) :|: z >= 0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 1 + z2 }-> 1 + s' :|: s' >= 0, s' <= 0, z1 >= 0, z' = 1 + z1 + z2, z - 1 >= 0, z2 >= 0 Function symbols to be analyzed: {INF}, {LENGTH} Previous analysis results are: EQ: runtime: O(n^1) [z'], size: O(1) [0] TAKE: runtime: O(n^1) [z'], size: O(1) [0] INF: runtime: INF, size: O(1) [0] ---------------------------------------- (73) 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: EQ(v0, v1) -> null_EQ [0] TAKE(v0, v1) -> null_TAKE [0] LENGTH(v0) -> null_LENGTH [0] And the following fresh constants: null_EQ, null_TAKE, null_LENGTH, const, const1, const2, const3 ---------------------------------------- (74) 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: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) [1] INF(z0) -> c3(INF(s(z0))) [1] TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) [1] LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) [1] EQ(v0, v1) -> null_EQ [0] TAKE(v0, v1) -> null_TAKE [0] LENGTH(v0) -> null_LENGTH [0] The TRS has the following type information: EQ :: s -> s -> c1:null_EQ s :: s -> s c1 :: c1:null_EQ -> c1:null_EQ INF :: s -> c3 c3 :: c3 -> c3 TAKE :: s -> cons -> c5:null_TAKE cons :: a -> cons -> cons c5 :: c5:null_TAKE -> c5:null_TAKE LENGTH :: cons -> c7:null_LENGTH c7 :: c7:null_LENGTH -> c7:null_LENGTH null_EQ :: c1:null_EQ null_TAKE :: c5:null_TAKE null_LENGTH :: c7:null_LENGTH const :: s const1 :: c3 const2 :: cons const3 :: a Rewrite Strategy: INNERMOST ---------------------------------------- (75) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: null_EQ => 0 null_TAKE => 0 null_LENGTH => 0 const => 0 const1 => 0 const2 => 0 const3 => 0 ---------------------------------------- (76) Obligation: Complexity RNTS consisting of the following rules: EQ(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 EQ(z, z') -{ 1 }-> 1 + EQ(z0, z1) :|: z1 >= 0, z = 1 + z0, z0 >= 0, z' = 1 + z1 INF(z) -{ 1 }-> 1 + INF(1 + z0) :|: z = z0, z0 >= 0 LENGTH(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 LENGTH(z) -{ 1 }-> 1 + LENGTH(z1) :|: z1 >= 0, z0 >= 0, z = 1 + z0 + z1 TAKE(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 TAKE(z, z') -{ 1 }-> 1 + TAKE(z0, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z = 1 + z0, z0 >= 0, z2 >= 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (77) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) We considered the (Usable) Rules:none And the Tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) The order we found is given by the following interpretation: Polynomial interpretation : POL(EQ(x_1, x_2)) = x_1 POL(INF(x_1)) = 0 POL(LENGTH(x_1)) = x_1 POL(TAKE(x_1, x_2)) = x_2 POL(c1(x_1)) = x_1 POL(c3(x_1)) = x_1 POL(c5(x_1)) = x_1 POL(c7(x_1)) = x_1 POL(cons(x_1, x_2)) = [1] + x_2 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (78) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) INF(z0) -> c3(INF(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) S tuples: INF(z0) -> c3(INF(s(z0))) K tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) Defined Rule Symbols:none Defined Pair Symbols: EQ_2, INF_1, TAKE_2, LENGTH_1 Compound Symbols: c1_1, c3_1, c5_1, c7_1 ---------------------------------------- (79) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace INF(z0) -> c3(INF(s(z0))) by INF(s(x0)) -> c3(INF(s(s(x0)))) ---------------------------------------- (80) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) INF(s(x0)) -> c3(INF(s(s(x0)))) S tuples: INF(s(x0)) -> c3(INF(s(s(x0)))) K tuples: EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) Defined Rule Symbols:none Defined Pair Symbols: EQ_2, TAKE_2, LENGTH_1, INF_1 Compound Symbols: c1_1, c5_1, c7_1, c3_1 ---------------------------------------- (81) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace EQ(s(z0), s(z1)) -> c1(EQ(z0, z1)) by EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) ---------------------------------------- (82) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) INF(s(x0)) -> c3(INF(s(s(x0)))) EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) S tuples: INF(s(x0)) -> c3(INF(s(s(x0)))) K tuples: TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) Defined Rule Symbols:none Defined Pair Symbols: TAKE_2, LENGTH_1, INF_1, EQ_2 Compound Symbols: c5_1, c7_1, c3_1, c1_1 ---------------------------------------- (83) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace INF(s(x0)) -> c3(INF(s(s(x0)))) by INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) ---------------------------------------- (84) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) S tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) K tuples: TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) Defined Rule Symbols:none Defined Pair Symbols: TAKE_2, LENGTH_1, EQ_2, INF_1 Compound Symbols: c5_1, c7_1, c1_1, c3_1 ---------------------------------------- (85) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace TAKE(s(z0), cons(z1, z2)) -> c5(TAKE(z0, z2)) by TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) ---------------------------------------- (86) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) S tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) K tuples: LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) Defined Rule Symbols:none Defined Pair Symbols: LENGTH_1, EQ_2, INF_1, TAKE_2 Compound Symbols: c7_1, c1_1, c3_1, c5_1 ---------------------------------------- (87) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace LENGTH(cons(z0, z1)) -> c7(LENGTH(z1)) by LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) ---------------------------------------- (88) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) S tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) K tuples: EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) Defined Rule Symbols:none Defined Pair Symbols: EQ_2, INF_1, TAKE_2, LENGTH_1 Compound Symbols: c1_1, c3_1, c5_1, c7_1 ---------------------------------------- (89) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace EQ(s(s(y0)), s(s(y1))) -> c1(EQ(s(y0), s(y1))) by EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) ---------------------------------------- (90) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) S tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) K tuples: TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) Defined Rule Symbols:none Defined Pair Symbols: INF_1, TAKE_2, LENGTH_1, EQ_2 Compound Symbols: c3_1, c5_1, c7_1, c1_1 ---------------------------------------- (91) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c5(TAKE(s(y0), cons(y1, y2))) by TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c5(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) ---------------------------------------- (92) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c5(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) S tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) K tuples: LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c5(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) Defined Rule Symbols:none Defined Pair Symbols: INF_1, LENGTH_1, EQ_2, TAKE_2 Compound Symbols: c3_1, c7_1, c1_1, c5_1 ---------------------------------------- (93) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace LENGTH(cons(z0, cons(y0, y1))) -> c7(LENGTH(cons(y0, y1))) by LENGTH(cons(z0, cons(z1, cons(y1, y2)))) -> c7(LENGTH(cons(z1, cons(y1, y2)))) ---------------------------------------- (94) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c5(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) LENGTH(cons(z0, cons(z1, cons(y1, y2)))) -> c7(LENGTH(cons(z1, cons(y1, y2)))) S tuples: INF(s(s(x0))) -> c3(INF(s(s(s(x0))))) K tuples: EQ(s(s(s(y0))), s(s(s(y1)))) -> c1(EQ(s(s(y0)), s(s(y1)))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c5(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) LENGTH(cons(z0, cons(z1, cons(y1, y2)))) -> c7(LENGTH(cons(z1, cons(y1, y2)))) Defined Rule Symbols:none Defined Pair Symbols: INF_1, EQ_2, TAKE_2, LENGTH_1 Compound Symbols: c3_1, c1_1, c5_1, c7_1 ---------------------------------------- (95) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (96) 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: eq(0, 0) -> true [1] eq(s(X), s(Y)) -> eq(X, Y) [1] eq(X, Y) -> false [1] inf(X) -> cons(X, inf(s(X))) [1] take(0, X) -> nil [1] take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) [1] length(nil) -> 0 [1] length(cons(X, L)) -> s(length(L)) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (97) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (98) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: eq(0, 0) -> true [1] eq(s(X), s(Y)) -> eq(X, Y) [1] eq(X, Y) -> false [1] inf(X) -> cons(X, inf(s(X))) [1] take(0, X) -> nil [1] take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) [1] length(nil) -> 0 [1] length(cons(X, L)) -> s(length(L)) [1] The TRS has the following type information: eq :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false inf :: 0:s -> cons:nil cons :: 0:s -> cons:nil -> cons:nil take :: 0:s -> cons:nil -> cons:nil nil :: cons:nil length :: cons:nil -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (99) 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: eq_2 inf_1 take_2 length_1 (c) The following functions are completely defined: none Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (100) 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: eq(0, 0) -> true [1] eq(s(X), s(Y)) -> eq(X, Y) [1] eq(X, Y) -> false [1] inf(X) -> cons(X, inf(s(X))) [1] take(0, X) -> nil [1] take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) [1] length(nil) -> 0 [1] length(cons(X, L)) -> s(length(L)) [1] The TRS has the following type information: eq :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false inf :: 0:s -> cons:nil cons :: 0:s -> cons:nil -> cons:nil take :: 0:s -> cons:nil -> cons:nil nil :: cons:nil length :: cons:nil -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (101) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (102) 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: eq(0, 0) -> true [1] eq(s(X), s(Y)) -> eq(X, Y) [1] eq(X, Y) -> false [1] inf(X) -> cons(X, inf(s(X))) [1] take(0, X) -> nil [1] take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) [1] length(nil) -> 0 [1] length(cons(X, L)) -> s(length(L)) [1] The TRS has the following type information: eq :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false inf :: 0:s -> cons:nil cons :: 0:s -> cons:nil -> cons:nil take :: 0:s -> cons:nil -> cons:nil nil :: cons:nil length :: cons:nil -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (103) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 true => 1 false => 0 nil => 0 ---------------------------------------- (104) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' = Y, Y >= 0, X >= 0, z = X inf(z) -{ 1 }-> 1 + X + inf(1 + X) :|: X >= 0, z = X length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' = X, X >= 0, z = 0 take(z, z') -{ 1 }-> 1 + Y + take(X, L) :|: z = 1 + X, Y >= 0, X >= 0, L >= 0, z' = 1 + Y + L ---------------------------------------- (105) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (106) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' >= 0, z >= 0 inf(z) -{ 1 }-> 1 + z + inf(1 + z) :|: z >= 0 length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 take(z, z') -{ 1 }-> 1 + Y + take(z - 1, L) :|: Y >= 0, z - 1 >= 0, L >= 0, z' = 1 + Y + L ---------------------------------------- (107) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { inf } { take } { length } { eq } ---------------------------------------- (108) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' >= 0, z >= 0 inf(z) -{ 1 }-> 1 + z + inf(1 + z) :|: z >= 0 length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 take(z, z') -{ 1 }-> 1 + Y + take(z - 1, L) :|: Y >= 0, z - 1 >= 0, L >= 0, z' = 1 + Y + L Function symbols to be analyzed: {inf}, {take}, {length}, {eq} ---------------------------------------- (109) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (110) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' >= 0, z >= 0 inf(z) -{ 1 }-> 1 + z + inf(1 + z) :|: z >= 0 length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 take(z, z') -{ 1 }-> 1 + Y + take(z - 1, L) :|: Y >= 0, z - 1 >= 0, L >= 0, z' = 1 + Y + L Function symbols to be analyzed: {inf}, {take}, {length}, {eq} ---------------------------------------- (111) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: inf after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (112) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' >= 0, z >= 0 inf(z) -{ 1 }-> 1 + z + inf(1 + z) :|: z >= 0 length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 take(z, z') -{ 1 }-> 1 + Y + take(z - 1, L) :|: Y >= 0, z - 1 >= 0, L >= 0, z' = 1 + Y + L Function symbols to be analyzed: {inf}, {take}, {length}, {eq} Previous analysis results are: inf: runtime: ?, size: O(1) [0] ---------------------------------------- (113) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: inf after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (114) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(z - 1, z' - 1) :|: z' - 1 >= 0, z - 1 >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' >= 0, z >= 0 inf(z) -{ 1 }-> 1 + z + inf(1 + z) :|: z >= 0 length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' >= 0, z = 0 take(z, z') -{ 1 }-> 1 + Y + take(z - 1, L) :|: Y >= 0, z - 1 >= 0, L >= 0, z' = 1 + Y + L Function symbols to be analyzed: {inf}, {take}, {length}, {eq} Previous analysis results are: inf: runtime: INF, size: O(1) [0] ---------------------------------------- (115) 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: take(v0, v1) -> null_take [0] length(v0) -> null_length [0] And the following fresh constants: null_take, null_length ---------------------------------------- (116) 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: eq(0, 0) -> true [1] eq(s(X), s(Y)) -> eq(X, Y) [1] eq(X, Y) -> false [1] inf(X) -> cons(X, inf(s(X))) [1] take(0, X) -> nil [1] take(s(X), cons(Y, L)) -> cons(Y, take(X, L)) [1] length(nil) -> 0 [1] length(cons(X, L)) -> s(length(L)) [1] take(v0, v1) -> null_take [0] length(v0) -> null_length [0] The TRS has the following type information: eq :: 0:s:null_length -> 0:s:null_length -> true:false 0 :: 0:s:null_length true :: true:false s :: 0:s:null_length -> 0:s:null_length false :: true:false inf :: 0:s:null_length -> cons:nil:null_take cons :: 0:s:null_length -> cons:nil:null_take -> cons:nil:null_take take :: 0:s:null_length -> cons:nil:null_take -> cons:nil:null_take nil :: cons:nil:null_take length :: cons:nil:null_take -> 0:s:null_length null_take :: cons:nil:null_take null_length :: 0:s:null_length Rewrite Strategy: INNERMOST ---------------------------------------- (117) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 true => 1 false => 0 nil => 0 null_take => 0 null_length => 0 ---------------------------------------- (118) Obligation: Complexity RNTS consisting of the following rules: eq(z, z') -{ 1 }-> eq(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' = Y, Y >= 0, X >= 0, z = X inf(z) -{ 1 }-> 1 + X + inf(1 + X) :|: X >= 0, z = X length(z) -{ 1 }-> 0 :|: z = 0 length(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 length(z) -{ 1 }-> 1 + length(L) :|: z = 1 + X + L, X >= 0, L >= 0 take(z, z') -{ 1 }-> 0 :|: z' = X, X >= 0, z = 0 take(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 take(z, z') -{ 1 }-> 1 + Y + take(X, L) :|: z = 1 + X, Y >= 0, X >= 0, L >= 0, z' = 1 + Y + L Only complete derivations are relevant for the runtime complexity.