MAYBE proof of input_vpQNFtUlLF.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) SimplificationProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRNTS (17) CpxRntsAnalysisOrderProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRNTS (19) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (20) CpxRNTS (21) IntTrsBoundProof [UPPER BOUND(ID), 212 ms] (22) CpxRNTS (23) IntTrsBoundProof [UPPER BOUND(ID), 8 ms] (24) CpxRNTS (25) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (26) CpxRNTS (27) IntTrsBoundProof [UPPER BOUND(ID), 337 ms] (28) CpxRNTS (29) IntTrsBoundProof [UPPER BOUND(ID), 97 ms] (30) CpxRNTS (31) ResultPropagationProof [UPPER BOUND(ID), 0 ms] (32) CpxRNTS (33) IntTrsBoundProof [UPPER BOUND(ID), 3177 ms] (34) CpxRNTS (35) IntTrsBoundProof [UPPER BOUND(ID), 727 ms] (36) CpxRNTS (37) CompletionProof [UPPER BOUND(ID), 0 ms] (38) CpxTypedWeightedCompleteTrs (39) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (40) CpxRNTS (41) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (42) CdtProblem (43) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (44) CdtProblem (45) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (46) CdtProblem (47) CdtRuleRemovalProof [UPPER BOUND(ADD(n^2)), 72 ms] (48) CdtProblem (49) CdtForwardInstantiationProof [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 ---------------------------------------- (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: f(X) -> cons(X, f(g(X))) g(0) -> s(0) g(s(X)) -> s(s(g(X))) sel(0, cons(X, Y)) -> X sel(s(X), cons(Y, Z)) -> sel(X, Z) 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: f(X) -> cons(X, f(g(X))) g(0') -> s(0') g(s(X)) -> s(s(g(X))) sel(0', cons(X, Y)) -> X sel(s(X), cons(Y, Z)) -> sel(X, Z) 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: f(X) -> cons(X, f(g(X))) g(0) -> s(0) g(s(X)) -> s(s(g(X))) sel(0, cons(X, Y)) -> X sel(s(X), cons(Y, Z)) -> sel(X, Z) 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: f(X) -> cons(X, f(g(X))) [1] g(0) -> s(0) [1] g(s(X)) -> s(s(g(X))) [1] sel(0, cons(X, Y)) -> X [1] sel(s(X), cons(Y, Z)) -> sel(X, Z) [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: f(X) -> cons(X, f(g(X))) [1] g(0) -> s(0) [1] g(s(X)) -> s(s(g(X))) [1] sel(0, cons(X, Y)) -> X [1] sel(s(X), cons(Y, Z)) -> sel(X, Z) [1] The TRS has the following type information: f :: 0:s -> cons cons :: 0:s -> cons -> cons g :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s sel :: 0:s -> cons -> 0:s 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: f_1 sel_2 (c) The following functions are completely defined: g_1 Due to the following rules being added: none And the following fresh constants: const ---------------------------------------- (10) Obligation: Runtime Complexity Weighted TRS where critical functions are completely defined. The underlying TRS is: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: f(X) -> cons(X, f(g(X))) [1] g(0) -> s(0) [1] g(s(X)) -> s(s(g(X))) [1] sel(0, cons(X, Y)) -> X [1] sel(s(X), cons(Y, Z)) -> sel(X, Z) [1] The TRS has the following type information: f :: 0:s -> cons cons :: 0:s -> cons -> cons g :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s sel :: 0:s -> cons -> 0:s const :: cons 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: f(0) -> cons(0, f(s(0))) [2] f(s(X')) -> cons(s(X'), f(s(s(g(X'))))) [2] g(0) -> s(0) [1] g(s(X)) -> s(s(g(X))) [1] sel(0, cons(X, Y)) -> X [1] sel(s(X), cons(Y, Z)) -> sel(X, Z) [1] The TRS has the following type information: f :: 0:s -> cons cons :: 0:s -> cons -> cons g :: 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s sel :: 0:s -> cons -> 0:s const :: cons 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 const => 0 ---------------------------------------- (14) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 }-> 1 + (1 + X') + f(1 + (1 + g(X'))) :|: X' >= 0, z = 1 + X' g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(X)) :|: z = 1 + X, X >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(X, Z) :|: Z >= 0, z = 1 + X, Y >= 0, X >= 0, z' = 1 + Y + Z ---------------------------------------- (15) SimplificationProof (BOTH BOUNDS(ID, ID)) Simplified the RNTS by moving equalities from the constraints into the right-hand sides. ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 }-> 1 + (1 + (z - 1)) + f(1 + (1 + g(z - 1))) :|: z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(z - 1)) :|: z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z ---------------------------------------- (17) CpxRntsAnalysisOrderProof (BOTH BOUNDS(ID, ID)) Found the following analysis order by SCC decomposition: { g } { sel } { f } ---------------------------------------- (18) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 }-> 1 + (1 + (z - 1)) + f(1 + (1 + g(z - 1))) :|: z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(z - 1)) :|: z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {g}, {sel}, {f} ---------------------------------------- (19) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (20) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 }-> 1 + (1 + (z - 1)) + f(1 + (1 + g(z - 1))) :|: z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(z - 1)) :|: z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {g}, {sel}, {f} ---------------------------------------- (21) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: g after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + 2*z ---------------------------------------- (22) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 }-> 1 + (1 + (z - 1)) + f(1 + (1 + g(z - 1))) :|: z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(z - 1)) :|: z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {g}, {sel}, {f} Previous analysis results are: g: runtime: ?, size: O(n^1) [1 + 2*z] ---------------------------------------- (23) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: g after applying outer abstraction to obtain an ITS, resulting in: O(n^1) with polynomial bound: 1 + z ---------------------------------------- (24) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 }-> 1 + (1 + (z - 1)) + f(1 + (1 + g(z - 1))) :|: z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(z - 1)) :|: z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {sel}, {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] ---------------------------------------- (25) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (26) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 + z }-> 1 + (1 + (z - 1)) + f(1 + (1 + s)) :|: s >= 0, s <= 2 * (z - 1) + 1, z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 + z }-> 1 + (1 + s') :|: s' >= 0, s' <= 2 * (z - 1) + 1, z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {sel}, {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] ---------------------------------------- (27) 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' ---------------------------------------- (28) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 + z }-> 1 + (1 + (z - 1)) + f(1 + (1 + s)) :|: s >= 0, s <= 2 * (z - 1) + 1, z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 + z }-> 1 + (1 + s') :|: s' >= 0, s' <= 2 * (z - 1) + 1, z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {sel}, {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] sel: runtime: ?, size: O(n^1) [z'] ---------------------------------------- (29) 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 ---------------------------------------- (30) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 + z }-> 1 + (1 + (z - 1)) + f(1 + (1 + s)) :|: s >= 0, s <= 2 * (z - 1) + 1, z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 + z }-> 1 + (1 + s') :|: s' >= 0, s' <= 2 * (z - 1) + 1, z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(z - 1, Z) :|: Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] ---------------------------------------- (31) ResultPropagationProof (UPPER BOUND(ID)) Applied inner abstraction using the recently inferred runtime/size bounds where possible. ---------------------------------------- (32) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 + z }-> 1 + (1 + (z - 1)) + f(1 + (1 + s)) :|: s >= 0, s <= 2 * (z - 1) + 1, z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 + z }-> 1 + (1 + s') :|: s' >= 0, s' <= 2 * (z - 1) + 1, z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 + z }-> s'' :|: s'' >= 0, s'' <= Z, Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] ---------------------------------------- (33) IntTrsBoundProof (UPPER BOUND(ID)) Computed SIZE bound using CoFloCo for: f after applying outer abstraction to obtain an ITS, resulting in: O(1) with polynomial bound: 0 ---------------------------------------- (34) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 + z }-> 1 + (1 + (z - 1)) + f(1 + (1 + s)) :|: s >= 0, s <= 2 * (z - 1) + 1, z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 + z }-> 1 + (1 + s') :|: s' >= 0, s' <= 2 * (z - 1) + 1, z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 + z }-> s'' :|: s'' >= 0, s'' <= Z, Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] f: runtime: ?, size: O(1) [0] ---------------------------------------- (35) IntTrsBoundProof (UPPER BOUND(ID)) Computed RUNTIME bound using CoFloCo for: f after applying outer abstraction to obtain an ITS, resulting in: INF with polynomial bound: ? ---------------------------------------- (36) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 2 }-> 1 + 0 + f(1 + 0) :|: z = 0 f(z) -{ 2 + z }-> 1 + (1 + (z - 1)) + f(1 + (1 + s)) :|: s >= 0, s <= 2 * (z - 1) + 1, z - 1 >= 0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 + z }-> 1 + (1 + s') :|: s' >= 0, s' <= 2 * (z - 1) + 1, z - 1 >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 + z }-> s'' :|: s'' >= 0, s'' <= Z, Z >= 0, Y >= 0, z - 1 >= 0, z' = 1 + Y + Z Function symbols to be analyzed: {f} Previous analysis results are: g: runtime: O(n^1) [1 + z], size: O(n^1) [1 + 2*z] sel: runtime: O(n^1) [1 + z], size: O(n^1) [z'] f: runtime: INF, size: O(1) [0] ---------------------------------------- (37) 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: sel(v0, v1) -> null_sel [0] g(v0) -> null_g [0] And the following fresh constants: null_sel, null_g, const ---------------------------------------- (38) 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: f(X) -> cons(X, f(g(X))) [1] g(0) -> s(0) [1] g(s(X)) -> s(s(g(X))) [1] sel(0, cons(X, Y)) -> X [1] sel(s(X), cons(Y, Z)) -> sel(X, Z) [1] sel(v0, v1) -> null_sel [0] g(v0) -> null_g [0] The TRS has the following type information: f :: 0:s:null_sel:null_g -> cons cons :: 0:s:null_sel:null_g -> cons -> cons g :: 0:s:null_sel:null_g -> 0:s:null_sel:null_g 0 :: 0:s:null_sel:null_g s :: 0:s:null_sel:null_g -> 0:s:null_sel:null_g sel :: 0:s:null_sel:null_g -> cons -> 0:s:null_sel:null_g null_sel :: 0:s:null_sel:null_g null_g :: 0:s:null_sel:null_g const :: cons Rewrite Strategy: INNERMOST ---------------------------------------- (39) 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 null_sel => 0 null_g => 0 const => 0 ---------------------------------------- (40) Obligation: Complexity RNTS consisting of the following rules: f(z) -{ 1 }-> 1 + X + f(g(X)) :|: X >= 0, z = X g(z) -{ 0 }-> 0 :|: v0 >= 0, z = v0 g(z) -{ 1 }-> 1 + 0 :|: z = 0 g(z) -{ 1 }-> 1 + (1 + g(X)) :|: z = 1 + X, X >= 0 sel(z, z') -{ 1 }-> X :|: Y >= 0, X >= 0, z' = 1 + X + Y, z = 0 sel(z, z') -{ 1 }-> sel(X, Z) :|: Z >= 0, z = 1 + X, Y >= 0, X >= 0, z' = 1 + Y + Z sel(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (41) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (42) Obligation: Complexity Dependency Tuples Problem Rules: f(z0) -> cons(z0, f(g(z0))) g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(0) -> c1 G(s(z0)) -> c2(G(z0)) SEL(0, cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(0) -> c1 G(s(z0)) -> c2(G(z0)) SEL(0, cons(z0, z1)) -> c3 SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) K tuples:none Defined Rule Symbols: f_1, g_1, sel_2 Defined Pair Symbols: F_1, G_1, SEL_2 Compound Symbols: c_2, c1, c2_1, c3, c4_1 ---------------------------------------- (43) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 2 trailing nodes: G(0) -> c1 SEL(0, cons(z0, z1)) -> c3 ---------------------------------------- (44) Obligation: Complexity Dependency Tuples Problem Rules: f(z0) -> cons(z0, f(g(z0))) g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) K tuples:none Defined Rule Symbols: f_1, g_1, sel_2 Defined Pair Symbols: F_1, G_1, SEL_2 Compound Symbols: c_2, c2_1, c4_1 ---------------------------------------- (45) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: f(z0) -> cons(z0, f(g(z0))) sel(0, cons(z0, z1)) -> z0 sel(s(z0), cons(z1, z2)) -> sel(z0, z2) ---------------------------------------- (46) Obligation: Complexity Dependency Tuples Problem Rules: g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) K tuples:none Defined Rule Symbols: g_1 Defined Pair Symbols: F_1, G_1, SEL_2 Compound Symbols: c_2, c2_1, c4_1 ---------------------------------------- (47) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2))) Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S. SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) We considered the (Usable) Rules:none And the Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) The order we found is given by the following interpretation: Polynomial interpretation : POL(0) = [2] POL(F(x_1)) = 0 POL(G(x_1)) = 0 POL(SEL(x_1, x_2)) = x_2^2 POL(c(x_1, x_2)) = x_1 + x_2 POL(c2(x_1)) = x_1 POL(c4(x_1)) = x_1 POL(cons(x_1, x_2)) = [1] + x_2 POL(g(x_1)) = [1] POL(s(x_1)) = 0 ---------------------------------------- (48) Obligation: Complexity Dependency Tuples Problem Rules: g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(z0)) -> c2(G(z0)) K tuples: SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) Defined Rule Symbols: g_1 Defined Pair Symbols: F_1, G_1, SEL_2 Compound Symbols: c_2, c2_1, c4_1 ---------------------------------------- (49) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace G(s(z0)) -> c2(G(z0)) by G(s(s(y0))) -> c2(G(s(y0))) ---------------------------------------- (50) Obligation: Complexity Dependency Tuples Problem Rules: g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) Tuples: F(z0) -> c(F(g(z0)), G(z0)) SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) G(s(s(y0))) -> c2(G(s(y0))) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(s(y0))) -> c2(G(s(y0))) K tuples: SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) Defined Rule Symbols: g_1 Defined Pair Symbols: F_1, SEL_2, G_1 Compound Symbols: c_2, c4_1, c2_1 ---------------------------------------- (51) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace SEL(s(z0), cons(z1, z2)) -> c4(SEL(z0, z2)) by SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(SEL(s(y0), cons(y1, y2))) ---------------------------------------- (52) Obligation: Complexity Dependency Tuples Problem Rules: g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(s(y0))) -> c2(G(s(y0))) SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(SEL(s(y0), cons(y1, y2))) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(s(y0))) -> c2(G(s(y0))) K tuples: SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(SEL(s(y0), cons(y1, y2))) Defined Rule Symbols: g_1 Defined Pair Symbols: F_1, G_1, SEL_2 Compound Symbols: c_2, c2_1, c4_1 ---------------------------------------- (53) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace G(s(s(y0))) -> c2(G(s(y0))) by G(s(s(s(y0)))) -> c2(G(s(s(y0)))) ---------------------------------------- (54) Obligation: Complexity Dependency Tuples Problem Rules: g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) Tuples: F(z0) -> c(F(g(z0)), G(z0)) SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(SEL(s(y0), cons(y1, y2))) G(s(s(s(y0)))) -> c2(G(s(s(y0)))) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(s(s(y0)))) -> c2(G(s(s(y0)))) K tuples: SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(SEL(s(y0), cons(y1, y2))) Defined Rule Symbols: g_1 Defined Pair Symbols: F_1, SEL_2, G_1 Compound Symbols: c_2, c4_1, c2_1 ---------------------------------------- (55) CdtForwardInstantiationProof (BOTH BOUNDS(ID, ID)) Use forward instantiation to replace SEL(s(s(y0)), cons(z1, cons(y1, y2))) -> c4(SEL(s(y0), cons(y1, y2))) by SEL(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(SEL(s(s(y0)), cons(z2, cons(y2, y3)))) ---------------------------------------- (56) Obligation: Complexity Dependency Tuples Problem Rules: g(0) -> s(0) g(s(z0)) -> s(s(g(z0))) Tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(s(s(y0)))) -> c2(G(s(s(y0)))) SEL(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(SEL(s(s(y0)), cons(z2, cons(y2, y3)))) S tuples: F(z0) -> c(F(g(z0)), G(z0)) G(s(s(s(y0)))) -> c2(G(s(s(y0)))) K tuples: SEL(s(s(s(y0))), cons(z1, cons(z2, cons(y2, y3)))) -> c4(SEL(s(s(y0)), cons(z2, cons(y2, y3)))) Defined Rule Symbols: g_1 Defined Pair Symbols: F_1, G_1, SEL_2 Compound Symbols: c_2, c2_1, c4_1