MAYBE proof of input_O0Wp1XiF6m.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). (0) CpxTRS (1) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxTRS (5) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) NarrowingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedCompleteTrs (13) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (14) CpxRNTS (15) InliningProof [UPPER BOUND(ID), 64 ms] (16) CpxRNTS (17) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CpxRNTS (21) ResultPropagationProof [UPPER BOUND(ID), 1 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 364 ms] (24) CpxRNTS (25) IntTrsBoundProof [UPPER BOUND(ID), 139 ms] (26) CpxRNTS (27) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 812 ms] (30) CpxRNTS (31) IntTrsBoundProof [UPPER BOUND(ID), 164 ms] (32) CpxRNTS (33) CompletionProof [UPPER BOUND(ID), 0 ms] (34) CpxTypedWeightedCompleteTrs (35) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (36) CpxRNTS (37) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (38) CdtProblem (39) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (40) CdtProblem (41) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (42) CdtProblem (43) CdtRuleRemovalProof [UPPER BOUND(ADD(n^1)), 79 ms] (44) CdtProblem (45) CdtRuleRemovalProof [UPPER BOUND(ADD(n^3)), 36 ms] (46) CdtProblem (47) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (48) CdtProblem (49) CdtInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (50) CdtProblem (51) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (52) CdtProblem (53) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (54) CdtProblem (55) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (56) CdtProblem (57) CdtForwardInstantiationProof [BOTH BOUNDS(ID, ID), 0 ms] (58) CdtProblem ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) head(cons(X, XS)) -> X 2nd(cons(X, XS)) -> head(XS) take(0, XS) -> nil take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, XS) 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: from(X) -> cons(X, from(s(X))) head(cons(X, XS)) -> X 2nd(cons(X, XS)) -> head(XS) take(0', XS) -> nil take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) sel(0', cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, XS) 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: from(X) -> cons(X, from(s(X))) head(cons(X, XS)) -> X 2nd(cons(X, XS)) -> head(XS) take(0, XS) -> nil take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) sel(0, cons(X, XS)) -> X sel(s(N), cons(X, XS)) -> sel(N, XS) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (5) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (6) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, INF). The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) [1] head(cons(X, XS)) -> X [1] 2nd(cons(X, XS)) -> head(XS) [1] take(0, XS) -> nil [1] take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) [1] sel(0, cons(X, XS)) -> X [1] sel(s(N), cons(X, XS)) -> sel(N, XS) [1] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) [1] head(cons(X, XS)) -> X [1] 2nd(cons(X, XS)) -> head(XS) [1] take(0, XS) -> nil [1] take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) [1] sel(0, cons(X, XS)) -> X [1] sel(s(N), cons(X, XS)) -> sel(N, XS) [1] The TRS has the following type information: from :: s:0 -> cons:nil cons :: s:0 -> cons:nil -> cons:nil s :: s:0 -> s:0 head :: cons:nil -> s:0 2nd :: cons:nil -> s:0 take :: s:0 -> cons:nil -> cons:nil 0 :: s:0 nil :: cons:nil sel :: s:0 -> cons:nil -> s:0 Rewrite Strategy: INNERMOST ---------------------------------------- (9) CompletionProof (UPPER BOUND(ID)) The transformation into a RNTS is sound, since: (a) The obligation is a constructor system where every type has a constant constructor, (b) The following defined symbols do not have to be completely defined, as they can never occur inside other defined symbols: from_1 head_1 2nd_1 take_2 sel_2 (c) The following functions are completely defined: none Due to the following rules being added: none And the following fresh constants: none ---------------------------------------- (10) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) [1] head(cons(X, XS)) -> X [1] 2nd(cons(X, XS)) -> head(XS) [1] take(0, XS) -> nil [1] take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) [1] sel(0, cons(X, XS)) -> X [1] sel(s(N), cons(X, XS)) -> sel(N, XS) [1] The TRS has the following type information: from :: s:0 -> cons:nil cons :: s:0 -> cons:nil -> cons:nil s :: s:0 -> s:0 head :: cons:nil -> s:0 2nd :: cons:nil -> s:0 take :: s:0 -> cons:nil -> cons:nil 0 :: s:0 nil :: cons:nil sel :: s:0 -> cons:nil -> s:0 Rewrite Strategy: INNERMOST ---------------------------------------- (11) NarrowingProof (BOTH BOUNDS(ID, ID)) Narrowed the inner basic terms of all right-hand sides by a single narrowing step. ---------------------------------------- (12) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) [1] head(cons(X, XS)) -> X [1] 2nd(cons(X, XS)) -> head(XS) [1] take(0, XS) -> nil [1] take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) [1] sel(0, cons(X, XS)) -> X [1] sel(s(N), cons(X, XS)) -> sel(N, XS) [1] The TRS has the following type information: from :: s:0 -> cons:nil cons :: s:0 -> cons:nil -> cons:nil s :: s:0 -> s:0 head :: cons:nil -> s:0 2nd :: cons:nil -> s:0 take :: s:0 -> cons:nil -> cons:nil 0 :: s:0 nil :: cons:nil sel :: s:0 -> cons:nil -> s:0 Rewrite Strategy: INNERMOST ---------------------------------------- (13) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 nil => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 1 }-> head(XS) :|: z = 1 + X + XS, X >= 0, XS >= 0 from(z) -{ 1 }-> 1 + X + from(1 + X) :|: X >= 0, z = X head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(N, XS) :|: z = 1 + N, z' = 1 + X + XS, X >= 0, XS >= 0, N >= 0 take(z, z') -{ 1 }-> 0 :|: z' = XS, z = 0, XS >= 0 take(z, z') -{ 1 }-> 1 + X + take(N, XS) :|: z = 1 + N, z' = 1 + X + XS, X >= 0, XS >= 0, N >= 0 ---------------------------------------- (15) InliningProof (UPPER BOUND(ID)) Inlined the following terminating rules on right-hand sides where appropriate: head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + X + from(1 + X) :|: X >= 0, z = X head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(N, XS) :|: z = 1 + N, z' = 1 + X + XS, X >= 0, XS >= 0, N >= 0 take(z, z') -{ 1 }-> 0 :|: z' = XS, z = 0, XS >= 0 take(z, z') -{ 1 }-> 1 + X + take(N, XS) :|: z = 1 + N, z' = 1 + X + XS, X >= 0, XS >= 0, N >= 0 ---------------------------------------- (17) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 ---------------------------------------- (19) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { sel } { from } { head } { take } { 2nd } ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {sel}, {from}, {head}, {take}, {2nd} ---------------------------------------- (21) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {sel}, {from}, {head}, {take}, {2nd} ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using KoAT for: sel after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: z' ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {sel}, {from}, {head}, {take}, {2nd} Previous analysis results are: sel: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (25) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using KoAT for: sel after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {from}, {head}, {take}, {2nd} Previous analysis results are: sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] ---------------------------------------- (27) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 + z }-> s :|: s >= 0, s <= XS, z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {from}, {head}, {take}, {2nd} Previous analysis results are: sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] ---------------------------------------- (29) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: from after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 + z }-> s :|: s >= 0, s <= XS, z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {from}, {head}, {take}, {2nd} Previous analysis results are: sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] from: runtime: ?, size: O(1) [0] ---------------------------------------- (31) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: from after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 2 }-> X' :|: z = 1 + X + XS, X >= 0, XS >= 0, XS = 1 + X' + XS', X' >= 0, XS' >= 0 from(z) -{ 1 }-> 1 + z + from(1 + z) :|: z >= 0 head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 + z }-> s :|: s >= 0, s <= XS, z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 take(z, z') -{ 1 }-> 0 :|: z = 0, z' >= 0 take(z, z') -{ 1 }-> 1 + X + take(z - 1, XS) :|: z' = 1 + X + XS, X >= 0, XS >= 0, z - 1 >= 0 Function symbols to be analyzed: {from}, {head}, {take}, {2nd} Previous analysis results are: sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] from: runtime: INF, size: O(1) [0] ---------------------------------------- (33) CompletionProof (UPPER BOUND(ID)) The TRS is a completely defined constructor system, as every type has a constant constructor and the following rules were added: head(v0) -> null_head [0] 2nd(v0) -> null_2nd [0] take(v0, v1) -> null_take [0] sel(v0, v1) -> null_sel [0] And the following fresh constants: null_head, null_2nd, null_take, null_sel ---------------------------------------- (34) Obligation: Runtime Complexity Weighted TRS where all functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: from(X) -> cons(X, from(s(X))) [1] head(cons(X, XS)) -> X [1] 2nd(cons(X, XS)) -> head(XS) [1] take(0, XS) -> nil [1] take(s(N), cons(X, XS)) -> cons(X, take(N, XS)) [1] sel(0, cons(X, XS)) -> X [1] sel(s(N), cons(X, XS)) -> sel(N, XS) [1] head(v0) -> null_head [0] 2nd(v0) -> null_2nd [0] take(v0, v1) -> null_take [0] sel(v0, v1) -> null_sel [0] The TRS has the following type information: from :: s:0:null_head:null_2nd:null_sel -> cons:nil:null_take cons :: s:0:null_head:null_2nd:null_sel -> cons:nil:null_take -> cons:nil:null_take s :: s:0:null_head:null_2nd:null_sel -> s:0:null_head:null_2nd:null_sel head :: cons:nil:null_take -> s:0:null_head:null_2nd:null_sel 2nd :: cons:nil:null_take -> s:0:null_head:null_2nd:null_sel take :: s:0:null_head:null_2nd:null_sel -> cons:nil:null_take -> cons:nil:null_take 0 :: s:0:null_head:null_2nd:null_sel nil :: cons:nil:null_take sel :: s:0:null_head:null_2nd:null_sel -> cons:nil:null_take -> s:0:null_head:null_2nd:null_sel null_head :: s:0:null_head:null_2nd:null_sel null_2nd :: s:0:null_head:null_2nd:null_sel null_take :: cons:nil:null_take null_sel :: s:0:null_head:null_2nd:null_sel Rewrite Strategy: INNERMOST ---------------------------------------- (35) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: 0 => 0 nil => 0 null_head => 0 null_2nd => 0 null_take => 0 null_sel => 0 ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: 2nd(z) -{ 1 }-> head(XS) :|: z = 1 + X + XS, X >= 0, XS >= 0 2nd(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 from(z) -{ 1 }-> 1 + X + from(1 + X) :|: X >= 0, z = X head(z) -{ 1 }-> X :|: z = 1 + X + XS, X >= 0, XS >= 0 head(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 sel(z, z') -{ 1 }-> X :|: z' = 1 + X + XS, X >= 0, z = 0, XS >= 0 sel(z, z') -{ 1 }-> sel(N, XS) :|: z = 1 + N, z' = 1 + X + XS, X >= 0, XS >= 0, N >= 0 sel(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 take(z, z') -{ 1 }-> 0 :|: z' = XS, z = 0, XS >= 0 take(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 take(z, z') -{ 1 }-> 1 + X + take(N, XS) :|: z = 1 + N, z' = 1 + X + XS, X >= 0, XS >= 0, N >= 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (37) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (38) Obligation: Complexity Dependency Tuples Problem Rules: from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Tuples: FROM(z0) -> c(FROM(s(z0))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0, z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0, cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) HEAD(cons(z0, z1)) -> c1 2ND(cons(z0, z1)) -> c2(HEAD(z1)) TAKE(0, z0) -> c3 TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(0, cons(z0, z1)) -> c5 SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) K tuples:none Defined Rule Symbols: from_1, head_1, 2nd_1, take_2, sel_2 Defined Pair Symbols: FROM_1, HEAD_1, 2ND_1, TAKE_2, SEL_2 Compound Symbols: c_1, c1, c2_1, c3, c4_1, c5, c6_1 ---------------------------------------- (39) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing nodes: 2ND(cons(z0, z1)) -> c2(HEAD(z1)) HEAD(cons(z0, z1)) -> c1 TAKE(0, z0) -> c3 SEL(0, cons(z0, z1)) -> c5 ---------------------------------------- (40) Obligation: Complexity Dependency Tuples Problem Rules: from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) K tuples:none Defined Rule Symbols: from_1, head_1, 2nd_1, take_2, sel_2 Defined Pair Symbols: FROM_1, TAKE_2, SEL_2 Compound Symbols: c_1, c4_1, c6_1 ---------------------------------------- (41) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: from(z0) -> cons(z0, from(s(z0))) head(cons(z0, z1)) -> z0 2nd(cons(z0, z1)) -> head(z1) take(0, z0) -> nil take(s(z0), cons(z1, z2)) -> cons(z1, take(z0, z2)) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) ---------------------------------------- (42) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) K tuples:none Defined Rule Symbols:none Defined Pair Symbols: FROM_1, TAKE_2, SEL_2 Compound Symbols: c_1, c4_1, c6_1 ---------------------------------------- (43) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) We considered the (Usable) Rules:none And the Tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(FROM(x_1)) = 0 POL(SEL(x_1, x_2)) = 0 POL(TAKE(x_1, x_2)) = x_1 POL(c(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(cons(x_1, x_2)) = 0 POL(s(x_1)) = [1] + x_1 ---------------------------------------- (44) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) K tuples: TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) Defined Rule Symbols:none Defined Pair Symbols: FROM_1, TAKE_2, SEL_2 Compound Symbols: c_1, c4_1, c6_1 ---------------------------------------- (45) CdtRuleRemovalProof (UPPER BOUND(ADD(n^3))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) We considered the (Usable) Rules:none And the Tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(FROM(x_1)) = x_1 + x_1^2 + x_1^3 POL(SEL(x_1, x_2)) = x_2^2 POL(TAKE(x_1, x_2)) = x_2 + x_2^2 + x_2^3 POL(c(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(c6(x_1)) = x_1 POL(cons(x_1, x_2)) = [1] + x_2 POL(s(x_1)) = 0 ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FROM(z0) -> c(FROM(s(z0))) TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) S tuples: FROM(z0) -> c(FROM(s(z0))) K tuples: TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) Defined Rule Symbols:none Defined Pair Symbols: FROM_1, TAKE_2, SEL_2 Compound Symbols: c_1, c4_1, c6_1 ---------------------------------------- (47) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace FROM(z0) -> c(FROM(s(z0))) by FROM(s(x0)) -> c(FROM(s(s(x0)))) ---------------------------------------- (48) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) FROM(s(x0)) -> c(FROM(s(s(x0)))) S tuples: FROM(s(x0)) -> c(FROM(s(s(x0)))) K tuples: TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) Defined Rule Symbols:none Defined Pair Symbols: TAKE_2, SEL_2, FROM_1 Compound Symbols: c4_1, c6_1, c_1 ---------------------------------------- (49) CdtInstantiationProof (BOTH BOUNDS(ID, ID)) Use instantiation to replace FROM(s(x0)) -> c(FROM(s(s(x0)))) by FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) ---------------------------------------- (50) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) S tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) K tuples: TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) Defined Rule Symbols:none Defined Pair Symbols: TAKE_2, SEL_2, FROM_1 Compound Symbols: c4_1, c6_1, c_1 ---------------------------------------- (51) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace TAKE(s(z0), cons(z1, z2)) -> c4(TAKE(z0, z2)) by TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(TAKE(s(y0), cons(y1, y2))) ---------------------------------------- (52) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(TAKE(s(y0), cons(y1, y2))) S tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) K tuples: SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(TAKE(s(y0), cons(y1, y2))) Defined Rule Symbols:none Defined Pair Symbols: SEL_2, FROM_1, TAKE_2 Compound Symbols: c6_1, c_1, c4_1 ---------------------------------------- (53) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace SEL(s(z0), cons(z1, z2)) -> c6(SEL(z0, z2)) by SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c6(SEL(s(y0), cons(y1, y2))) ---------------------------------------- (54) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(TAKE(s(y0), cons(y1, y2))) SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c6(SEL(s(y0), cons(y1, y2))) S tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) K tuples: TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(TAKE(s(y0), cons(y1, y2))) SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c6(SEL(s(y0), cons(y1, y2))) Defined Rule Symbols:none Defined Pair Symbols: FROM_1, TAKE_2, SEL_2 Compound Symbols: c_1, c4_1, c6_1 ---------------------------------------- (55) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace TAKE(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(TAKE(s(y0), cons(y1, y2))) by TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) ---------------------------------------- (56) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c6(SEL(s(y0), cons(y1, y2))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) S tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) K tuples: SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c6(SEL(s(y0), cons(y1, y2))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) Defined Rule Symbols:none Defined Pair Symbols: FROM_1, SEL_2, TAKE_2 Compound Symbols: c_1, c6_1, c4_1 ---------------------------------------- (57) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c6(SEL(s(y0), cons(y1, y2))) by SEL(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c6(SEL(s(s(y0)), cons(z2, cons(y2, y3)))) ---------------------------------------- (58) Obligation: Complexity Dependency Tuples Problem Rules:none Tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) SEL(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c6(SEL(s(s(y0)), cons(z2, cons(y2, y3)))) S tuples: FROM(s(s(x0))) -> c(FROM(s(s(s(x0))))) K tuples: TAKE(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(TAKE(s(s(y0)), cons(z2, cons(y2, y3)))) SEL(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c6(SEL(s(s(y0)), cons(z2, cons(y2, y3)))) Defined Rule Symbols:none Defined Pair Symbols: FROM_1, TAKE_2, SEL_2 Compound Symbols: c_1, c4_1, c6_1