WORST_CASE(Omega(n^2),O(n^2)) proof of input_AXQod7XSju.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). (0) CpxTRS (1) CpxTrsToCdtProof [UPPER BOUND(ID), 0 ms] (2) CdtProblem (3) CdtLeafRemovalProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CdtProblem (5) CdtUsableRulesProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CdtProblem (7) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxRelTRS (9) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (10) CpxWeightedTrs (11) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTypedWeightedTrs (13) CompletionProof [UPPER BOUND(ID), 0 ms] (14) CpxTypedWeightedCompleteTrs (15) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (16) CpxRNTS (17) CompleteCoflocoProof [FINISHED, 266 ms] (18) BOUNDS(1, n^2) (19) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (20) CdtProblem (21) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (22) CpxRelTRS (23) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (24) CpxRelTRS (25) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (26) typed CpxTrs (27) OrderProof [LOWER BOUND(ID), 8 ms] (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 281 ms] (30) BEST (31) proven lower bound (32) LowerBoundPropagationProof [FINISHED, 0 ms] (33) BOUNDS(n^1, INF) (34) typed CpxTrs (35) RewriteLemmaProof [LOWER BOUND(ID), 98 ms] (36) typed CpxTrs (37) RewriteLemmaProof [LOWER BOUND(ID), 58 ms] (38) typed CpxTrs (39) RewriteLemmaProof [LOWER BOUND(ID), 664 ms] (40) proven lower bound (41) LowerBoundPropagationProof [FINISHED, 0 ms] (42) BOUNDS(n^2, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^2, n^2). The TRS R consists of the following rules: and(tt, X) -> activate(X) plus(N, 0) -> N plus(N, s(M)) -> s(plus(N, M)) x(N, 0) -> 0 x(N, s(M)) -> plus(x(N, M), N) activate(X) -> X S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) CpxTrsToCdtProof (UPPER BOUND(ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (2) Obligation: Complexity Dependency Tuples Problem Rules: and(tt, z0) -> activate(z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0) -> 0 x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Tuples: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0) -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 S tuples: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0) -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 K tuples:none Defined Rule Symbols: and_2, plus_2, x_2, activate_1 Defined Pair Symbols: AND_2, PLUS_2, X_2, ACTIVATE_1 Compound Symbols: c_1, c1, c2_1, c3, c4_2, c5 ---------------------------------------- (3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID)) Removed 4 trailing nodes: PLUS(z0, 0) -> c1 AND(tt, z0) -> c(ACTIVATE(z0)) ACTIVATE(z0) -> c5 X(z0, 0) -> c3 ---------------------------------------- (4) Obligation: Complexity Dependency Tuples Problem Rules: and(tt, z0) -> activate(z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0) -> 0 x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Tuples: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) S tuples: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) K tuples:none Defined Rule Symbols: and_2, plus_2, x_2, activate_1 Defined Pair Symbols: PLUS_2, X_2 Compound Symbols: c2_1, c4_2 ---------------------------------------- (5) CdtUsableRulesProof (BOTH BOUNDS(ID, ID)) The following rules are not usable and were removed: and(tt, z0) -> activate(z0) activate(z0) -> z0 ---------------------------------------- (6) Obligation: Complexity Dependency Tuples Problem Rules: x(z0, 0) -> 0 x(z0, s(z1)) -> plus(x(z0, z1), z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) Tuples: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) S tuples: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) K tuples:none Defined Rule Symbols: x_2, plus_2 Defined Pair Symbols: PLUS_2, X_2 Compound Symbols: c2_1, c4_2 ---------------------------------------- (7) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (8) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) The (relative) TRS S consists of the following rules: x(z0, 0) -> 0 x(z0, s(z1)) -> plus(x(z0, z1), z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) Rewrite Strategy: INNERMOST ---------------------------------------- (9) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (10) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^2). The TRS R consists of the following rules: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) [1] X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) [1] x(z0, 0) -> 0 [0] x(z0, s(z1)) -> plus(x(z0, z1), z0) [0] plus(z0, 0) -> z0 [0] plus(z0, s(z1)) -> s(plus(z0, z1)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (11) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (12) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) [1] X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) [1] x(z0, 0) -> 0 [0] x(z0, s(z1)) -> plus(x(z0, z1), z0) [0] plus(z0, 0) -> z0 [0] plus(z0, s(z1)) -> s(plus(z0, z1)) [0] The TRS has the following type information: PLUS :: s:0 -> s:0 -> c2 s :: s:0 -> s:0 c2 :: c2 -> c2 X :: s:0 -> s:0 -> c4 c4 :: c2 -> c4 -> c4 x :: s:0 -> s:0 -> s:0 0 :: s:0 plus :: s:0 -> s:0 -> s:0 Rewrite Strategy: INNERMOST ---------------------------------------- (13) 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: x(v0, v1) -> null_x [0] plus(v0, v1) -> null_plus [0] PLUS(v0, v1) -> null_PLUS [0] X(v0, v1) -> null_X [0] And the following fresh constants: null_x, null_plus, null_PLUS, null_X ---------------------------------------- (14) 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: PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) [1] X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) [1] x(z0, 0) -> 0 [0] x(z0, s(z1)) -> plus(x(z0, z1), z0) [0] plus(z0, 0) -> z0 [0] plus(z0, s(z1)) -> s(plus(z0, z1)) [0] x(v0, v1) -> null_x [0] plus(v0, v1) -> null_plus [0] PLUS(v0, v1) -> null_PLUS [0] X(v0, v1) -> null_X [0] The TRS has the following type information: PLUS :: s:0:null_x:null_plus -> s:0:null_x:null_plus -> c2:null_PLUS s :: s:0:null_x:null_plus -> s:0:null_x:null_plus c2 :: c2:null_PLUS -> c2:null_PLUS X :: s:0:null_x:null_plus -> s:0:null_x:null_plus -> c4:null_X c4 :: c2:null_PLUS -> c4:null_X -> c4:null_X x :: s:0:null_x:null_plus -> s:0:null_x:null_plus -> s:0:null_x:null_plus 0 :: s:0:null_x:null_plus plus :: s:0:null_x:null_plus -> s:0:null_x:null_plus -> s:0:null_x:null_plus null_x :: s:0:null_x:null_plus null_plus :: s:0:null_x:null_plus null_PLUS :: c2:null_PLUS null_X :: c4:null_X Rewrite Strategy: INNERMOST ---------------------------------------- (15) 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_x => 0 null_plus => 0 null_PLUS => 0 null_X => 0 ---------------------------------------- (16) Obligation: Complexity RNTS consisting of the following rules: PLUS(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 PLUS(z, z') -{ 1 }-> 1 + PLUS(z0, z1) :|: z = z0, z1 >= 0, z0 >= 0, z' = 1 + z1 X(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 X(z, z') -{ 1 }-> 1 + PLUS(x(z0, z1), z0) + X(z0, z1) :|: z = z0, z1 >= 0, z0 >= 0, z' = 1 + z1 plus(z, z') -{ 0 }-> z0 :|: z = z0, z0 >= 0, z' = 0 plus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 plus(z, z') -{ 0 }-> 1 + plus(z0, z1) :|: z = z0, z1 >= 0, z0 >= 0, z' = 1 + z1 x(z, z') -{ 0 }-> plus(x(z0, z1), z0) :|: z = z0, z1 >= 0, z0 >= 0, z' = 1 + z1 x(z, z') -{ 0 }-> 0 :|: z = z0, z0 >= 0, z' = 0 x(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (17) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V),0,[fun(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[fun1(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[x(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[plus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(fun(V1, V, Out),1,[fun(V3, V2, Ret1)],[Out = 1 + Ret1,V1 = V3,V2 >= 0,V3 >= 0,V = 1 + V2]). eq(fun1(V1, V, Out),1,[x(V5, V4, Ret010),fun(Ret010, V5, Ret01),fun1(V5, V4, Ret11)],[Out = 1 + Ret01 + Ret11,V1 = V5,V4 >= 0,V5 >= 0,V = 1 + V4]). eq(x(V1, V, Out),0,[],[Out = 0,V1 = V6,V6 >= 0,V = 0]). eq(x(V1, V, Out),0,[x(V7, V8, Ret0),plus(Ret0, V7, Ret)],[Out = Ret,V1 = V7,V8 >= 0,V7 >= 0,V = 1 + V8]). eq(plus(V1, V, Out),0,[],[Out = V9,V1 = V9,V9 >= 0,V = 0]). eq(plus(V1, V, Out),0,[plus(V10, V11, Ret12)],[Out = 1 + Ret12,V1 = V10,V11 >= 0,V10 >= 0,V = 1 + V11]). eq(x(V1, V, Out),0,[],[Out = 0,V13 >= 0,V12 >= 0,V1 = V13,V = V12]). eq(plus(V1, V, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V1 = V15,V = V14]). eq(fun(V1, V, Out),0,[],[Out = 0,V17 >= 0,V16 >= 0,V1 = V17,V = V16]). eq(fun1(V1, V, Out),0,[],[Out = 0,V18 >= 0,V19 >= 0,V1 = V18,V = V19]). input_output_vars(fun(V1,V,Out),[V1,V],[Out]). input_output_vars(fun1(V1,V,Out),[V1,V],[Out]). input_output_vars(x(V1,V,Out),[V1,V],[Out]). input_output_vars(plus(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [fun/3] 1. recursive : [plus/3] 2. recursive [non_tail] : [x/3] 3. recursive : [fun1/3] 4. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into fun/3 1. SCC is partially evaluated into plus/3 2. SCC is partially evaluated into x/3 3. SCC is partially evaluated into fun1/3 4. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations fun/3 * CE 6 is refined into CE [14] * CE 5 is refined into CE [15] ### Cost equations --> "Loop" of fun/3 * CEs [15] --> Loop 11 * CEs [14] --> Loop 12 ### Ranking functions of CR fun(V1,V,Out) * RF of phase [11]: [V] #### Partial ranking functions of CR fun(V1,V,Out) * Partial RF of phase [11]: - RF of loop [11:1]: V ### Specialization of cost equations plus/3 * CE 13 is refined into CE [16] * CE 11 is refined into CE [17] * CE 12 is refined into CE [18] ### Cost equations --> "Loop" of plus/3 * CEs [18] --> Loop 13 * CEs [16] --> Loop 14 * CEs [17] --> Loop 15 ### Ranking functions of CR plus(V1,V,Out) * RF of phase [13]: [V] #### Partial ranking functions of CR plus(V1,V,Out) * Partial RF of phase [13]: - RF of loop [13:1]: V ### Specialization of cost equations x/3 * CE 9 is refined into CE [19] * CE 10 is refined into CE [20,21,22,23] ### Cost equations --> "Loop" of x/3 * CEs [23] --> Loop 16 * CEs [22] --> Loop 17 * CEs [21] --> Loop 18 * CEs [20] --> Loop 19 * CEs [19] --> Loop 20 ### Ranking functions of CR x(V1,V,Out) * RF of phase [16,17,18,19]: [V] #### Partial ranking functions of CR x(V1,V,Out) * Partial RF of phase [16,17,18,19]: - RF of loop [16:1,17:1,18:1,19:1]: V ### Specialization of cost equations fun1/3 * CE 8 is refined into CE [24] * CE 7 is refined into CE [25,26,27,28] ### Cost equations --> "Loop" of fun1/3 * CEs [26,28] --> Loop 21 * CEs [25,27] --> Loop 22 * CEs [24] --> Loop 23 ### Ranking functions of CR fun1(V1,V,Out) * RF of phase [21,22]: [V] #### Partial ranking functions of CR fun1(V1,V,Out) * Partial RF of phase [21,22]: - RF of loop [21:1,22:1]: V ### Specialization of cost equations start/2 * CE 1 is refined into CE [29,30] * CE 2 is refined into CE [31,32] * CE 3 is refined into CE [33,34] * CE 4 is refined into CE [35,36,37,38] ### Cost equations --> "Loop" of start/2 * CEs [29,30,31,32,33,34,35,36,37,38] --> Loop 24 ### Ranking functions of CR start(V1,V) #### Partial ranking functions of CR start(V1,V) Computing Bounds ===================================== #### Cost of chains of fun(V1,V,Out): * Chain [[11],12]: 1*it(11)+0 Such that:it(11) =< Out with precondition: [V1>=0,Out>=1,V>=Out] * Chain [12]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of plus(V1,V,Out): * Chain [[13],15]: 0 with precondition: [V+V1=Out,V1>=0,V>=1] * Chain [[13],14]: 0 with precondition: [V1>=0,Out>=1,V>=Out] * Chain [15]: 0 with precondition: [V=0,V1=Out,V1>=0] * Chain [14]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of x(V1,V,Out): * Chain [[16,17,18,19],20]: 0 with precondition: [V1>=0,V>=1,Out>=0] * Chain [20]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of fun1(V1,V,Out): * Chain [[21,22],23]: 2*it(21)+2*s(5)+0 Such that:aux(4) =< V1 aux(7) =< V it(21) =< aux(7) s(6) =< it(21)*aux(4) s(5) =< s(6) with precondition: [V1>=0,V>=1,Out>=1] * Chain [23]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of start(V1,V): * Chain [24]: 3*s(7)+2*s(12)+0 Such that:s(8) =< V1 aux(8) =< V s(7) =< aux(8) s(11) =< s(7)*s(8) s(12) =< s(11) with precondition: [V1>=0,V>=0] Closed-form bounds of start(V1,V): ------------------------------------- * Chain [24] with precondition: [V1>=0,V>=0] - Upper bound: 2*V1*V+3*V - Complexity: n^2 ### Maximum cost of start(V1,V): 2*V1*V+3*V Asymptotic class: n^2 * Total analysis performed in 221 ms. ---------------------------------------- (18) BOUNDS(1, n^2) ---------------------------------------- (19) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (20) Obligation: Complexity Dependency Tuples Problem Rules: and(tt, z0) -> activate(z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0) -> 0 x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Tuples: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0) -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 S tuples: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0) -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 K tuples:none Defined Rule Symbols: and_2, plus_2, x_2, activate_1 Defined Pair Symbols: AND_2, PLUS_2, X_2, ACTIVATE_1 Compound Symbols: c_1, c1, c2_1, c3, c4_2, c5 ---------------------------------------- (21) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (22) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0) -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0) -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 The (relative) TRS S consists of the following rules: and(tt, z0) -> activate(z0) plus(z0, 0) -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0) -> 0 x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (23) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (24) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^2, INF). The TRS R consists of the following rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 The (relative) TRS S consists of the following rules: and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (25) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (26) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 ---------------------------------------- (27) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: PLUS, X, x, plus They will be analysed ascendingly in the following order: PLUS < X x < X plus < x ---------------------------------------- (28) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 Generator Equations: gen_c1:c29_6(0) <=> c1 gen_c1:c29_6(+(x, 1)) <=> c2(gen_c1:c29_6(x)) gen_0':s10_6(0) <=> 0' gen_0':s10_6(+(x, 1)) <=> s(gen_0':s10_6(x)) gen_c3:c411_6(0) <=> c3 gen_c3:c411_6(+(x, 1)) <=> c4(c1, gen_c3:c411_6(x)) The following defined symbols remain to be analysed: PLUS, X, x, plus They will be analysed ascendingly in the following order: PLUS < X x < X plus < x ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: PLUS(gen_0':s10_6(a), gen_0':s10_6(n13_6)) -> gen_c1:c29_6(n13_6), rt in Omega(1 + n13_6) Induction Base: PLUS(gen_0':s10_6(a), gen_0':s10_6(0)) ->_R^Omega(1) c1 Induction Step: PLUS(gen_0':s10_6(a), gen_0':s10_6(+(n13_6, 1))) ->_R^Omega(1) c2(PLUS(gen_0':s10_6(a), gen_0':s10_6(n13_6))) ->_IH c2(gen_c1:c29_6(c14_6)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (30) Complex Obligation (BEST) ---------------------------------------- (31) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 Generator Equations: gen_c1:c29_6(0) <=> c1 gen_c1:c29_6(+(x, 1)) <=> c2(gen_c1:c29_6(x)) gen_0':s10_6(0) <=> 0' gen_0':s10_6(+(x, 1)) <=> s(gen_0':s10_6(x)) gen_c3:c411_6(0) <=> c3 gen_c3:c411_6(+(x, 1)) <=> c4(c1, gen_c3:c411_6(x)) The following defined symbols remain to be analysed: PLUS, X, x, plus They will be analysed ascendingly in the following order: PLUS < X x < X plus < x ---------------------------------------- (32) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (33) BOUNDS(n^1, INF) ---------------------------------------- (34) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 Lemmas: PLUS(gen_0':s10_6(a), gen_0':s10_6(n13_6)) -> gen_c1:c29_6(n13_6), rt in Omega(1 + n13_6) Generator Equations: gen_c1:c29_6(0) <=> c1 gen_c1:c29_6(+(x, 1)) <=> c2(gen_c1:c29_6(x)) gen_0':s10_6(0) <=> 0' gen_0':s10_6(+(x, 1)) <=> s(gen_0':s10_6(x)) gen_c3:c411_6(0) <=> c3 gen_c3:c411_6(+(x, 1)) <=> c4(c1, gen_c3:c411_6(x)) The following defined symbols remain to be analysed: plus, X, x They will be analysed ascendingly in the following order: x < X plus < x ---------------------------------------- (35) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: plus(gen_0':s10_6(a), gen_0':s10_6(n414_6)) -> gen_0':s10_6(+(n414_6, a)), rt in Omega(0) Induction Base: plus(gen_0':s10_6(a), gen_0':s10_6(0)) ->_R^Omega(0) gen_0':s10_6(a) Induction Step: plus(gen_0':s10_6(a), gen_0':s10_6(+(n414_6, 1))) ->_R^Omega(0) s(plus(gen_0':s10_6(a), gen_0':s10_6(n414_6))) ->_IH s(gen_0':s10_6(+(a, c415_6))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (36) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 Lemmas: PLUS(gen_0':s10_6(a), gen_0':s10_6(n13_6)) -> gen_c1:c29_6(n13_6), rt in Omega(1 + n13_6) plus(gen_0':s10_6(a), gen_0':s10_6(n414_6)) -> gen_0':s10_6(+(n414_6, a)), rt in Omega(0) Generator Equations: gen_c1:c29_6(0) <=> c1 gen_c1:c29_6(+(x, 1)) <=> c2(gen_c1:c29_6(x)) gen_0':s10_6(0) <=> 0' gen_0':s10_6(+(x, 1)) <=> s(gen_0':s10_6(x)) gen_c3:c411_6(0) <=> c3 gen_c3:c411_6(+(x, 1)) <=> c4(c1, gen_c3:c411_6(x)) The following defined symbols remain to be analysed: x, X They will be analysed ascendingly in the following order: x < X ---------------------------------------- (37) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: x(gen_0':s10_6(a), gen_0':s10_6(n1311_6)) -> gen_0':s10_6(*(n1311_6, a)), rt in Omega(0) Induction Base: x(gen_0':s10_6(a), gen_0':s10_6(0)) ->_R^Omega(0) 0' Induction Step: x(gen_0':s10_6(a), gen_0':s10_6(+(n1311_6, 1))) ->_R^Omega(0) plus(x(gen_0':s10_6(a), gen_0':s10_6(n1311_6)), gen_0':s10_6(a)) ->_IH plus(gen_0':s10_6(*(c1312_6, a)), gen_0':s10_6(a)) ->_L^Omega(0) gen_0':s10_6(+(a, *(n1311_6, a))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (38) Obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 Lemmas: PLUS(gen_0':s10_6(a), gen_0':s10_6(n13_6)) -> gen_c1:c29_6(n13_6), rt in Omega(1 + n13_6) plus(gen_0':s10_6(a), gen_0':s10_6(n414_6)) -> gen_0':s10_6(+(n414_6, a)), rt in Omega(0) x(gen_0':s10_6(a), gen_0':s10_6(n1311_6)) -> gen_0':s10_6(*(n1311_6, a)), rt in Omega(0) Generator Equations: gen_c1:c29_6(0) <=> c1 gen_c1:c29_6(+(x, 1)) <=> c2(gen_c1:c29_6(x)) gen_0':s10_6(0) <=> 0' gen_0':s10_6(+(x, 1)) <=> s(gen_0':s10_6(x)) gen_c3:c411_6(0) <=> c3 gen_c3:c411_6(+(x, 1)) <=> c4(c1, gen_c3:c411_6(x)) The following defined symbols remain to be analysed: X ---------------------------------------- (39) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: X(gen_0':s10_6(a), gen_0':s10_6(n2333_6)) -> *12_6, rt in Omega(a*n2333_6 + n2333_6) Induction Base: X(gen_0':s10_6(a), gen_0':s10_6(0)) Induction Step: X(gen_0':s10_6(a), gen_0':s10_6(+(n2333_6, 1))) ->_R^Omega(1) c4(PLUS(x(gen_0':s10_6(a), gen_0':s10_6(n2333_6)), gen_0':s10_6(a)), X(gen_0':s10_6(a), gen_0':s10_6(n2333_6))) ->_L^Omega(0) c4(PLUS(gen_0':s10_6(*(n2333_6, a)), gen_0':s10_6(a)), X(gen_0':s10_6(a), gen_0':s10_6(n2333_6))) ->_L^Omega(1 + a) c4(gen_c1:c29_6(a), X(gen_0':s10_6(*(n2333_6, a)), gen_0':s10_6(n2333_6))) ->_IH c4(gen_c1:c29_6(*(n2333_6, a)), *12_6) We have rt in Omega(n^2) and sz in O(n). Thus, we have irc_R in Omega(n^2). ---------------------------------------- (40) Obligation: Proved the lower bound n^2 for the following obligation: Innermost TRS: Rules: AND(tt, z0) -> c(ACTIVATE(z0)) PLUS(z0, 0') -> c1 PLUS(z0, s(z1)) -> c2(PLUS(z0, z1)) X(z0, 0') -> c3 X(z0, s(z1)) -> c4(PLUS(x(z0, z1), z0), X(z0, z1)) ACTIVATE(z0) -> c5 and(tt, z0) -> activate(z0) plus(z0, 0') -> z0 plus(z0, s(z1)) -> s(plus(z0, z1)) x(z0, 0') -> 0' x(z0, s(z1)) -> plus(x(z0, z1), z0) activate(z0) -> z0 Types: AND :: tt -> a -> c tt :: tt c :: c5 -> c ACTIVATE :: a -> c5 PLUS :: 0':s -> 0':s -> c1:c2 0' :: 0':s c1 :: c1:c2 s :: 0':s -> 0':s c2 :: c1:c2 -> c1:c2 X :: 0':s -> 0':s -> c3:c4 c3 :: c3:c4 c4 :: c1:c2 -> c3:c4 -> c3:c4 x :: 0':s -> 0':s -> 0':s c5 :: c5 and :: tt -> and:activate -> and:activate activate :: and:activate -> and:activate plus :: 0':s -> 0':s -> 0':s hole_c1_6 :: c hole_tt2_6 :: tt hole_a3_6 :: a hole_c54_6 :: c5 hole_c1:c25_6 :: c1:c2 hole_0':s6_6 :: 0':s hole_c3:c47_6 :: c3:c4 hole_and:activate8_6 :: and:activate gen_c1:c29_6 :: Nat -> c1:c2 gen_0':s10_6 :: Nat -> 0':s gen_c3:c411_6 :: Nat -> c3:c4 Lemmas: PLUS(gen_0':s10_6(a), gen_0':s10_6(n13_6)) -> gen_c1:c29_6(n13_6), rt in Omega(1 + n13_6) plus(gen_0':s10_6(a), gen_0':s10_6(n414_6)) -> gen_0':s10_6(+(n414_6, a)), rt in Omega(0) x(gen_0':s10_6(a), gen_0':s10_6(n1311_6)) -> gen_0':s10_6(*(n1311_6, a)), rt in Omega(0) Generator Equations: gen_c1:c29_6(0) <=> c1 gen_c1:c29_6(+(x, 1)) <=> c2(gen_c1:c29_6(x)) gen_0':s10_6(0) <=> 0' gen_0':s10_6(+(x, 1)) <=> s(gen_0':s10_6(x)) gen_c3:c411_6(0) <=> c3 gen_c3:c411_6(+(x, 1)) <=> c4(c1, gen_c3:c411_6(x)) The following defined symbols remain to be analysed: X ---------------------------------------- (41) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (42) BOUNDS(n^2, INF)