KILLED proof of input_orLz2LWRhR.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), 5 ms] (14) typed CpxTrs (15) RewriteLemmaProof [LOWER BOUND(ID), 317 ms] (16) typed CpxTrs (17) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (18) TRS for Loop Detection (19) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (20) CdtProblem (21) CdtLeafRemovalProof [ComplexityIfPolyImplication, 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) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (36) CpxTypedWeightedCompleteTrs (37) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (38) CpxRNTS (39) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (40) CpxRNTS (41) CompletionProof [UPPER BOUND(ID), 0 ms] (42) CpxTypedWeightedCompleteTrs (43) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (44) CpxRNTS (45) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CdtProblem (47) CdtRhsSimplificationProcessorProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CdtProblem (49) CdtNarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (50) CdtProblem (51) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (52) CdtProblem (53) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 704 ms] (54) CdtProblem (55) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 1250 ms] (56) CdtProblem (57) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (58) CpxWeightedTrs (59) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (60) CpxTypedWeightedTrs (61) CompletionProof [UPPER BOUND(ID), 0 ms] (62) CpxTypedWeightedCompleteTrs (63) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (64) CpxTypedWeightedCompleteTrs (65) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (66) CpxRNTS (67) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (68) CpxRNTS (69) CompletionProof [UPPER BOUND(ID), 0 ms] (70) CpxTypedWeightedCompleteTrs (71) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (72) 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: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) badd(x, Nil) -> x goal(x, y) -> badd(x, y) 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: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) badd(x, Nil) -> x goal(x, y) -> badd(x, y) 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: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) badd(x, Nil) -> x goal(x, y) -> badd(x, y) 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: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) S tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) K tuples:none Defined Rule Symbols: badd_2, goal_2 Defined Pair Symbols: BADD_2, GOAL_2 Compound Symbols: c_2, c1, c2_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(1, INF). The TRS R consists of the following rules: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) The (relative) TRS S consists of the following rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) The (relative) TRS S consists of the following rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (12) Obligation: Innermost TRS: Rules: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Types: BADD :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 -> c:c1 Nil :: Cons:Nil badd :: Cons:Nil -> Cons:Nil -> Cons:Nil c1 :: c:c1 GOAL :: Cons:Nil -> Cons:Nil -> c2 c2 :: c:c1 -> c2 goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_c:c11_3 :: c:c1 hole_Cons:Nil2_3 :: Cons:Nil hole_c23_3 :: c2 gen_c:c14_3 :: Nat -> c:c1 gen_Cons:Nil5_3 :: Nat -> Cons:Nil ---------------------------------------- (13) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: BADD, badd They will be analysed ascendingly in the following order: badd < BADD ---------------------------------------- (14) Obligation: Innermost TRS: Rules: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Types: BADD :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 -> c:c1 Nil :: Cons:Nil badd :: Cons:Nil -> Cons:Nil -> Cons:Nil c1 :: c:c1 GOAL :: Cons:Nil -> Cons:Nil -> c2 c2 :: c:c1 -> c2 goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_c:c11_3 :: c:c1 hole_Cons:Nil2_3 :: Cons:Nil hole_c23_3 :: c2 gen_c:c14_3 :: Nat -> c:c1 gen_Cons:Nil5_3 :: Nat -> Cons:Nil Generator Equations: gen_c:c14_3(0) <=> c1 gen_c:c14_3(+(x, 1)) <=> c(c1, gen_c:c14_3(x)) gen_Cons:Nil5_3(0) <=> Nil gen_Cons:Nil5_3(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil5_3(x)) The following defined symbols remain to be analysed: badd, BADD They will be analysed ascendingly in the following order: badd < BADD ---------------------------------------- (15) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: badd(gen_Cons:Nil5_3(a), gen_Cons:Nil5_3(+(1, n7_3))) -> *6_3, rt in Omega(0) Induction Base: badd(gen_Cons:Nil5_3(a), gen_Cons:Nil5_3(+(1, 0))) Induction Step: badd(gen_Cons:Nil5_3(a), gen_Cons:Nil5_3(+(1, +(n7_3, 1)))) ->_R^Omega(0) badd(Cons(Nil, Nil), badd(gen_Cons:Nil5_3(a), gen_Cons:Nil5_3(+(1, n7_3)))) ->_IH badd(Cons(Nil, Nil), *6_3) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (16) Obligation: Innermost TRS: Rules: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Types: BADD :: Cons:Nil -> Cons:Nil -> c:c1 Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c:c1 -> c:c1 -> c:c1 Nil :: Cons:Nil badd :: Cons:Nil -> Cons:Nil -> Cons:Nil c1 :: c:c1 GOAL :: Cons:Nil -> Cons:Nil -> c2 c2 :: c:c1 -> c2 goal :: Cons:Nil -> Cons:Nil -> Cons:Nil hole_c:c11_3 :: c:c1 hole_Cons:Nil2_3 :: Cons:Nil hole_c23_3 :: c2 gen_c:c14_3 :: Nat -> c:c1 gen_Cons:Nil5_3 :: Nat -> Cons:Nil Lemmas: badd(gen_Cons:Nil5_3(a), gen_Cons:Nil5_3(+(1, n7_3))) -> *6_3, rt in Omega(0) Generator Equations: gen_c:c14_3(0) <=> c1 gen_c:c14_3(+(x, 1)) <=> c(c1, gen_c:c14_3(x)) gen_Cons:Nil5_3(0) <=> Nil gen_Cons:Nil5_3(+(x, 1)) <=> Cons(Nil, gen_Cons:Nil5_3(x)) The following defined symbols remain to be analysed: BADD ---------------------------------------- (17) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (18) 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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) The (relative) TRS S consists of the following rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Rewrite Strategy: INNERMOST ---------------------------------------- (19) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (20) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) S tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) BADD(z0, Nil) -> c1 GOAL(z0, z1) -> c2(BADD(z0, z1)) K tuples:none Defined Rule Symbols: badd_2, goal_2 Defined Pair Symbols: BADD_2, GOAL_2 Compound Symbols: c_2, c1, c2_1 ---------------------------------------- (21) CdtLeafRemovalProof (ComplexityIfPolyImplication) Removed 1 leading nodes: GOAL(z0, z1) -> c2(BADD(z0, z1)) Removed 1 trailing nodes: BADD(z0, Nil) -> c1 ---------------------------------------- (22) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 goal(z0, z1) -> badd(z0, z1) Tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) S tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) K tuples:none Defined Rule Symbols: badd_2, goal_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2 ---------------------------------------- (23) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: goal(z0, z1) -> badd(z0, z1) ---------------------------------------- (24) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) S tuples: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) K tuples:none Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2 ---------------------------------------- (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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) The (relative) TRS S consists of the following rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) [1] badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) [0] badd(z0, Nil) -> z0 [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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) [1] badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) [0] badd(z0, Nil) -> z0 [0] The TRS has the following type information: BADD :: Cons:Nil -> Cons:Nil -> c Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c -> c -> c Nil :: Cons:Nil badd :: Cons:Nil -> Cons:Nil -> Cons:Nil Rewrite Strategy: INNERMOST ---------------------------------------- (33) 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: BADD_2 (c) The following functions are completely defined: badd_2 Due to the following rules being added: badd(v0, v1) -> Nil [0] And the following fresh constants: const ---------------------------------------- (34) 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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) [1] badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) [0] badd(z0, Nil) -> z0 [0] badd(v0, v1) -> Nil [0] The TRS has the following type information: BADD :: Cons:Nil -> Cons:Nil -> c Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c -> c -> c Nil :: Cons:Nil badd :: Cons:Nil -> Cons:Nil -> Cons:Nil const :: c Rewrite Strategy: INNERMOST ---------------------------------------- (35) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (36) 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: BADD(z0, Cons(z1, Cons(z1', z2'))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2'))), BADD(z0, Cons(z1', z2'))) [1] BADD(z0, Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), z0), BADD(z0, Nil)) [1] BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), Nil), BADD(z0, z2)) [1] badd(z0, Cons(z1, Cons(z1'', z2''))) -> badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2''))) [0] badd(z0, Cons(z1, Nil)) -> badd(Cons(Nil, Nil), z0) [0] badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), Nil) [0] badd(z0, Nil) -> z0 [0] badd(v0, v1) -> Nil [0] The TRS has the following type information: BADD :: Cons:Nil -> Cons:Nil -> c Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil c :: c -> c -> c Nil :: Cons:Nil badd :: Cons:Nil -> Cons:Nil -> Cons:Nil const :: c Rewrite Strategy: INNERMOST ---------------------------------------- (37) 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 const => 0 ---------------------------------------- (38) Obligation: Complexity RNTS consisting of the following rules: BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, z0) + BADD(z0, 0) :|: z = z0, z1 >= 0, z0 >= 0, z' = 1 + z1 + 0 BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, badd(1 + 0 + 0, badd(z0, z2'))) + BADD(z0, 1 + z1' + z2') :|: z = z0, z1 >= 0, z1' >= 0, z2' >= 0, z' = 1 + z1 + (1 + z1' + z2'), z0 >= 0 BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, 0) + BADD(z0, z2) :|: z = z0, z1 >= 0, z' = 1 + z1 + z2, z0 >= 0, z2 >= 0 badd(z, z') -{ 0 }-> z0 :|: z = z0, z0 >= 0, z' = 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, z0) :|: z = z0, z1 >= 0, z0 >= 0, z' = 1 + z1 + 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, badd(1 + 0 + 0, badd(z0, z2''))) :|: z = z0, z1 >= 0, z' = 1 + z1 + (1 + z1'' + z2''), z0 >= 0, z2'' >= 0, z1'' >= 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, 0) :|: z = z0, z1 >= 0, z' = 1 + z1 + z2, z0 >= 0, z2 >= 0 badd(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 ---------------------------------------- (39) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, z) + BADD(z, 0) :|: z' - 1 >= 0, z >= 0 BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, badd(1 + 0 + 0, badd(z, z2'))) + BADD(z, 1 + z1' + z2') :|: z1 >= 0, z1' >= 0, z2' >= 0, z' = 1 + z1 + (1 + z1' + z2'), z >= 0 BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, 0) + BADD(z, z2) :|: z1 >= 0, z' = 1 + z1 + z2, z >= 0, z2 >= 0 badd(z, z') -{ 0 }-> z :|: z >= 0, z' = 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, z) :|: z' - 1 >= 0, z >= 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, badd(1 + 0 + 0, badd(z, z2''))) :|: z1 >= 0, z' = 1 + z1 + (1 + z1'' + z2''), z >= 0, z2'' >= 0, z1'' >= 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, 0) :|: z1 >= 0, z' = 1 + z1 + z2, z >= 0, z2 >= 0 badd(z, z') -{ 0 }-> 0 :|: z >= 0, z' >= 0 ---------------------------------------- (41) 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: badd(v0, v1) -> null_badd [0] BADD(v0, v1) -> null_BADD [0] And the following fresh constants: null_badd, null_BADD ---------------------------------------- (42) 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: BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) [1] badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) [0] badd(z0, Nil) -> z0 [0] badd(v0, v1) -> null_badd [0] BADD(v0, v1) -> null_BADD [0] The TRS has the following type information: BADD :: Cons:Nil:null_badd -> Cons:Nil:null_badd -> c:null_BADD Cons :: Cons:Nil:null_badd -> Cons:Nil:null_badd -> Cons:Nil:null_badd c :: c:null_BADD -> c:null_BADD -> c:null_BADD Nil :: Cons:Nil:null_badd badd :: Cons:Nil:null_badd -> Cons:Nil:null_badd -> Cons:Nil:null_badd null_badd :: Cons:Nil:null_badd null_BADD :: c:null_BADD Rewrite Strategy: INNERMOST ---------------------------------------- (43) 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 null_badd => 0 null_BADD => 0 ---------------------------------------- (44) Obligation: Complexity RNTS consisting of the following rules: BADD(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 BADD(z, z') -{ 1 }-> 1 + BADD(1 + 0 + 0, badd(z0, z2)) + BADD(z0, z2) :|: z = z0, z1 >= 0, z' = 1 + z1 + z2, z0 >= 0, z2 >= 0 badd(z, z') -{ 0 }-> z0 :|: z = z0, z0 >= 0, z' = 0 badd(z, z') -{ 0 }-> badd(1 + 0 + 0, badd(z0, z2)) :|: z = z0, z1 >= 0, z' = 1 + z1 + z2, z0 >= 0, z2 >= 0 badd(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (45) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace BADD(z0, Cons(z1, z2)) -> c(BADD(Cons(Nil, Nil), badd(z0, z2)), BADD(z0, z2)) by BADD(z0, Cons(x1, Cons(z1, z2))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2))), BADD(z0, Cons(z1, z2))) BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0), BADD(z0, Nil)) ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(x1, Cons(z1, z2))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2))), BADD(z0, Cons(z1, z2))) BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0), BADD(z0, Nil)) S tuples: BADD(z0, Cons(x1, Cons(z1, z2))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2))), BADD(z0, Cons(z1, z2))) BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0), BADD(z0, Nil)) K tuples:none Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2 ---------------------------------------- (47) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID)) Removed 1 trailing tuple parts ---------------------------------------- (48) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(x1, Cons(z1, z2))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2))), BADD(z0, Cons(z1, z2))) BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0)) S tuples: BADD(z0, Cons(x1, Cons(z1, z2))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2))), BADD(z0, Cons(z1, z2))) BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0)) K tuples:none Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2, c_1 ---------------------------------------- (49) CdtNarrowingProof (BOTH BOUNDS(ID, ID)) Use narrowing to replace BADD(z0, Cons(x1, Cons(z1, z2))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2))), BADD(z0, Cons(z1, z2))) by BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) ---------------------------------------- (50) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0)) BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) S tuples: BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0)) BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) K tuples:none Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_1, c_2 ---------------------------------------- (51) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace BADD(z0, Cons(x1, Nil)) -> c(BADD(Cons(Nil, Nil), z0)) by BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) ---------------------------------------- (52) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) S tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) K tuples:none Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2, c_1 ---------------------------------------- (53) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) We considered the (Usable) Rules:none And the Tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) The order we found is given by the following interpretation: Matrix interpretation [MATRO]: Non-tuple symbols: <<< M( badd_2(x_1, x_2) ) = [[0], [0]] + [[0, 0], [0, 0]] * x_1 + [[0, 0], [0, 0]] * x_2 >>> <<< M( Cons_2(x_1, x_2) ) = [[0], [4]] + [[0, 0], [0, 0]] * x_1 + [[0, 4], [0, 0]] * x_2 >>> <<< M( Nil ) = [[0], [0]] >>> Tuple symbols: <<< M( c_2(x_1, x_2) ) = [[0], [0]] + [[1, 0], [0, 0]] * x_1 + [[1, 0], [0, 0]] * x_2 >>> <<< M( c_1(x_1) ) = [[0], [0]] + [[1, 0], [0, 0]] * x_1 >>> <<< M( BADD_2(x_1, x_2) ) = [[0], [2]] + [[1, 0], [0, 0]] * x_1 + [[0, 0], [0, 0]] * x_2 >>> Matrix type: We used a basic matrix type which is not further parametrizeable. As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order. ---------------------------------------- (54) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) S tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) K tuples: BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2, c_1 ---------------------------------------- (55) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) We considered the (Usable) Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 And the Tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) The order we found is given by the following interpretation: Matrix interpretation [MATRO]: Non-tuple symbols: <<< M( badd_2(x_1, x_2) ) = [[0], [0]] + [[2, 0], [0, 1]] * x_1 + [[0, 0], [0, 1]] * x_2 >>> <<< M( Cons_2(x_1, x_2) ) = [[0], [2]] + [[0, 0], [0, 0]] * x_1 + [[0, 4], [0, 1]] * x_2 >>> <<< M( Nil ) = [[0], [0]] >>> Tuple symbols: <<< M( c_2(x_1, x_2) ) = [[0], [0]] + [[1, 0], [0, 0]] * x_1 + [[1, 0], [0, 0]] * x_2 >>> <<< M( c_1(x_1) ) = [[0], [0]] + [[1, 0], [0, 0]] * x_1 >>> <<< M( BADD_2(x_1, x_2) ) = [[0], [0]] + [[1, 0], [0, 0]] * x_1 + [[1, 0], [0, 0]] * x_2 >>> Matrix type: We used a basic matrix type which is not further parametrizeable. As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order. ---------------------------------------- (56) Obligation: Complexity Dependency Tuples Problem Rules: badd(z0, Cons(z1, z2)) -> badd(Cons(Nil, Nil), badd(z0, z2)) badd(z0, Nil) -> z0 Tuples: BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) S tuples: BADD(Cons(y1, Nil), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Nil))) K tuples: BADD(Cons(y1, Cons(y2, Cons(y3, y4))), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Cons(y3, y4))))) BADD(Cons(y1, Cons(y2, Nil)), Cons(z1, Nil)) -> c(BADD(Cons(Nil, Nil), Cons(y1, Cons(y2, Nil)))) BADD(z0, Cons(x1, Cons(x2, Cons(z1, z2)))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(z0, z2)))), BADD(z0, Cons(x2, Cons(z1, z2)))) BADD(z0, Cons(x1, Cons(x2, Nil))) -> c(BADD(Cons(Nil, Nil), badd(Cons(Nil, Nil), z0)), BADD(z0, Cons(x2, Nil))) Defined Rule Symbols: badd_2 Defined Pair Symbols: BADD_2 Compound Symbols: c_2, c_1 ---------------------------------------- (57) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (58) 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: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) [1] badd(x, Nil) -> x [1] goal(x, y) -> badd(x, y) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (59) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (60) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) [1] badd(x, Nil) -> x [1] goal(x, y) -> badd(x, y) [1] The TRS has the following type information: badd :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil Rewrite Strategy: INNERMOST ---------------------------------------- (61) 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: goal_2 (c) The following functions are completely defined: badd_2 Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (62) 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: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) [1] badd(x, Nil) -> x [1] goal(x, y) -> badd(x, y) [1] The TRS has the following type information: badd :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil Rewrite Strategy: INNERMOST ---------------------------------------- (63) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (64) 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: badd(x', Cons(x, Cons(x1, xs'))) -> badd(Cons(Nil, Nil), badd(Cons(Nil, Nil), badd(x', xs'))) [2] badd(x', Cons(x, Nil)) -> badd(Cons(Nil, Nil), x') [2] badd(x, Nil) -> x [1] goal(x, y) -> badd(x, y) [1] The TRS has the following type information: badd :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil Rewrite Strategy: INNERMOST ---------------------------------------- (65) 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 ---------------------------------------- (66) Obligation: Complexity RNTS consisting of the following rules: badd(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 badd(z, z') -{ 2 }-> badd(1 + 0 + 0, x') :|: x' >= 0, x >= 0, z' = 1 + x + 0, z = x' badd(z, z') -{ 2 }-> badd(1 + 0 + 0, badd(1 + 0 + 0, badd(x', xs'))) :|: x1 >= 0, x' >= 0, x >= 0, xs' >= 0, z = x', z' = 1 + x + (1 + x1 + xs') goal(z, z') -{ 1 }-> badd(x, y) :|: x >= 0, y >= 0, z = x, z' = y ---------------------------------------- (67) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (68) Obligation: Complexity RNTS consisting of the following rules: badd(z, z') -{ 1 }-> z :|: z >= 0, z' = 0 badd(z, z') -{ 2 }-> badd(1 + 0 + 0, z) :|: z >= 0, z' - 1 >= 0 badd(z, z') -{ 2 }-> badd(1 + 0 + 0, badd(1 + 0 + 0, badd(z, xs'))) :|: x1 >= 0, z >= 0, x >= 0, xs' >= 0, z' = 1 + x + (1 + x1 + xs') goal(z, z') -{ 1 }-> badd(z, z') :|: z >= 0, z' >= 0 ---------------------------------------- (69) 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: none And the following fresh constants: none ---------------------------------------- (70) 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: badd(x', Cons(x, xs)) -> badd(Cons(Nil, Nil), badd(x', xs)) [1] badd(x, Nil) -> x [1] goal(x, y) -> badd(x, y) [1] The TRS has the following type information: badd :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: Cons:Nil -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil goal :: Cons:Nil -> Cons:Nil -> Cons:Nil Rewrite Strategy: INNERMOST ---------------------------------------- (71) 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 ---------------------------------------- (72) Obligation: Complexity RNTS consisting of the following rules: badd(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 badd(z, z') -{ 1 }-> badd(1 + 0 + 0, badd(x', xs)) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, x >= 0, z = x' goal(z, z') -{ 1 }-> badd(x, y) :|: x >= 0, y >= 0, z = x, z' = y Only complete derivations are relevant for the runtime complexity.