WORST_CASE(Omega(n^1),O(n^2)) proof of input_9TN589wdr8.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 275 ms] (10) BOUNDS(1, n^2) (11) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRelTRS (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 11 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 259 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 125 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: cond(true, x) -> cond(odd(x), p(p(p(x)))) odd(0) -> false odd(s(0)) -> true odd(s(s(x))) -> odd(x) p(0) -> 0 p(s(x)) -> x S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) 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: cond(true, x) -> cond(odd(x), p(p(p(x)))) [1] odd(0) -> false [1] odd(s(0)) -> true [1] odd(s(s(x))) -> odd(x) [1] p(0) -> 0 [1] p(s(x)) -> x [1] Rewrite Strategy: INNERMOST ---------------------------------------- (3) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (4) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: cond(true, x) -> cond(odd(x), p(p(p(x)))) [1] odd(0) -> false [1] odd(s(0)) -> true [1] odd(s(s(x))) -> odd(x) [1] p(0) -> 0 [1] p(s(x)) -> x [1] The TRS has the following type information: cond :: true:false -> 0:s -> cond true :: true:false odd :: 0:s -> true:false p :: 0:s -> 0:s 0 :: 0:s false :: true:false s :: 0:s -> 0:s Rewrite Strategy: INNERMOST ---------------------------------------- (5) 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: cond(v0, v1) -> null_cond [0] And the following fresh constants: null_cond ---------------------------------------- (6) 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: cond(true, x) -> cond(odd(x), p(p(p(x)))) [1] odd(0) -> false [1] odd(s(0)) -> true [1] odd(s(s(x))) -> odd(x) [1] p(0) -> 0 [1] p(s(x)) -> x [1] cond(v0, v1) -> null_cond [0] The TRS has the following type information: cond :: true:false -> 0:s -> null_cond true :: true:false odd :: 0:s -> true:false p :: 0:s -> 0:s 0 :: 0:s false :: true:false s :: 0:s -> 0:s null_cond :: null_cond Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: true => 1 0 => 0 false => 0 null_cond => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: cond(z, z') -{ 1 }-> cond(odd(x), p(p(p(x)))) :|: z' = x, z = 1, x >= 0 cond(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 odd(z) -{ 1 }-> odd(x) :|: x >= 0, z = 1 + (1 + x) odd(z) -{ 1 }-> 1 :|: z = 1 + 0 odd(z) -{ 1 }-> 0 :|: z = 0 p(z) -{ 1 }-> x :|: x >= 0, z = 1 + x p(z) -{ 1 }-> 0 :|: z = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V),0,[cond(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[odd(V1, Out)],[V1 >= 0]). eq(start(V1, V),0,[p(V1, Out)],[V1 >= 0]). eq(cond(V1, V, Out),1,[odd(V2, Ret0),p(V2, Ret100),p(Ret100, Ret10),p(Ret10, Ret1),cond(Ret0, Ret1, Ret)],[Out = Ret,V = V2,V1 = 1,V2 >= 0]). eq(odd(V1, Out),1,[],[Out = 0,V1 = 0]). eq(odd(V1, Out),1,[],[Out = 1,V1 = 1]). eq(odd(V1, Out),1,[odd(V3, Ret2)],[Out = Ret2,V3 >= 0,V1 = 2 + V3]). eq(p(V1, Out),1,[],[Out = 0,V1 = 0]). eq(p(V1, Out),1,[],[Out = V4,V4 >= 0,V1 = 1 + V4]). eq(cond(V1, V, Out),0,[],[Out = 0,V6 >= 0,V5 >= 0,V1 = V6,V = V5]). input_output_vars(cond(V1,V,Out),[V1,V],[Out]). input_output_vars(odd(V1,Out),[V1],[Out]). input_output_vars(p(V1,Out),[V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [odd/2] 1. non_recursive : [p/2] 2. recursive : [cond/3] 3. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into odd/2 1. SCC is partially evaluated into p/2 2. SCC is partially evaluated into cond/3 3. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations odd/2 * CE 8 is refined into CE [11] * CE 7 is refined into CE [12] * CE 6 is refined into CE [13] ### Cost equations --> "Loop" of odd/2 * CEs [12] --> Loop 9 * CEs [13] --> Loop 10 * CEs [11] --> Loop 11 ### Ranking functions of CR odd(V1,Out) * RF of phase [11]: [V1-1] #### Partial ranking functions of CR odd(V1,Out) * Partial RF of phase [11]: - RF of loop [11:1]: V1-1 ### Specialization of cost equations p/2 * CE 10 is refined into CE [14] * CE 9 is refined into CE [15] ### Cost equations --> "Loop" of p/2 * CEs [14] --> Loop 12 * CEs [15] --> Loop 13 ### Ranking functions of CR p(V1,Out) #### Partial ranking functions of CR p(V1,Out) ### Specialization of cost equations cond/3 * CE 5 is refined into CE [16] * CE 4 is refined into CE [17,18,19,20,21] ### Cost equations --> "Loop" of cond/3 * CEs [21] --> Loop 14 * CEs [20] --> Loop 15 * CEs [19] --> Loop 16 * CEs [18] --> Loop 17 * CEs [17] --> Loop 18 * CEs [16] --> Loop 19 ### Ranking functions of CR cond(V1,V,Out) * RF of phase [14]: [V/3-2/3] #### Partial ranking functions of CR cond(V1,V,Out) * Partial RF of phase [14]: - RF of loop [14:1]: V/3-2/3 ### Specialization of cost equations start/2 * CE 1 is refined into CE [22,23,24,25] * CE 2 is refined into CE [26,27,28,29] * CE 3 is refined into CE [30,31] ### Cost equations --> "Loop" of start/2 * CEs [22] --> Loop 20 * CEs [23,24,25,27,28,29,31] --> Loop 21 * CEs [26,30] --> Loop 22 ### Ranking functions of CR start(V1,V) #### Partial ranking functions of CR start(V1,V) Computing Bounds ===================================== #### Cost of chains of odd(V1,Out): * Chain [[11],10]: 1*it(11)+1 Such that:it(11) =< V1 with precondition: [Out=0,V1>=2] * Chain [[11],9]: 1*it(11)+1 Such that:it(11) =< V1 with precondition: [Out=1,V1>=3] * Chain [10]: 1 with precondition: [V1=0,Out=0] * Chain [9]: 1 with precondition: [V1=1,Out=1] #### Cost of chains of p(V1,Out): * Chain [13]: 1 with precondition: [V1=0,Out=0] * Chain [12]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of cond(V1,V,Out): * Chain [[14],19]: 5*it(14)+1*s(3)+0 Such that:aux(1) =< V it(14) =< V/3 s(3) =< it(14)*aux(1) with precondition: [V1=1,Out=0,V>=3] * Chain [[14],18,19]: 5*it(14)+1*s(3)+5 Such that:aux(1) =< V it(14) =< V/3 s(3) =< it(14)*aux(1) with precondition: [V1=1,Out=0,V>=3] * Chain [[14],17,19]: 5*it(14)+1*s(3)+5 Such that:aux(1) =< V it(14) =< V/3 s(3) =< it(14)*aux(1) with precondition: [V1=1,Out=0,V>=4] * Chain [[14],17,18,19]: 5*it(14)+1*s(3)+10 Such that:aux(1) =< V it(14) =< V/3 s(3) =< it(14)*aux(1) with precondition: [V1=1,Out=0,V>=4] * Chain [[14],16,19]: 5*it(14)+1*s(3)+1*s(4)+5 Such that:s(4) =< 2 aux(1) =< V it(14) =< V/3 s(3) =< it(14)*aux(1) with precondition: [V1=1,Out=0,V>=5] * Chain [[14],15,19]: 6*it(14)+1*s(3)+5 Such that:aux(2) =< V it(14) =< aux(2) s(3) =< it(14)*aux(2) with precondition: [V1=1,Out=0,V>=6] * Chain [19]: 0 with precondition: [Out=0,V1>=0,V>=0] * Chain [18,19]: 5 with precondition: [V1=1,V=0,Out=0] * Chain [17,19]: 5 with precondition: [V1=1,V=1,Out=0] * Chain [17,18,19]: 10 with precondition: [V1=1,V=1,Out=0] * Chain [16,19]: 1*s(4)+5 Such that:s(4) =< 2 with precondition: [V1=1,V=2,Out=0] * Chain [15,19]: 1*s(5)+5 Such that:s(5) =< V with precondition: [V1=1,Out=0,V>=3] #### Cost of chains of start(V1,V): * Chain [22]: 1 with precondition: [V1=0] * Chain [21]: 2*s(26)+7*s(30)+25*s(31)+5*s(32)+1*s(33)+2*s(34)+10 Such that:s(28) =< V s(29) =< V/3 aux(5) =< 2 aux(6) =< V1 s(26) =< aux(5) s(34) =< aux(6) s(30) =< s(28) s(31) =< s(29) s(32) =< s(31)*s(28) s(33) =< s(30)*s(28) with precondition: [V1>=1] * Chain [20]: 5 with precondition: [V1>=0,V>=0] Closed-form bounds of start(V1,V): ------------------------------------- * Chain [22] with precondition: [V1=0] - Upper bound: 1 - Complexity: constant * Chain [21] with precondition: [V1>=1] - Upper bound: 2*V1+14+nat(V)*7+nat(V)*nat(V)+nat(V)*5*nat(V/3)+nat(V/3)*25 - Complexity: n^2 * Chain [20] with precondition: [V1>=0,V>=0] - Upper bound: 5 - Complexity: constant ### Maximum cost of start(V1,V): max([4,2*V1+13+nat(V)*7+nat(V)*nat(V)+nat(V)*5*nat(V/3)+nat(V/3)*25])+1 Asymptotic class: n^2 * Total analysis performed in 202 ms. ---------------------------------------- (10) BOUNDS(1, n^2) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0) -> false odd(s(0)) -> true odd(s(s(z0))) -> odd(z0) p(0) -> 0 p(s(z0)) -> z0 Tuples: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0) -> c2 ODD(s(0)) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0) -> c5 P(s(z0)) -> c6 S tuples: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0) -> c2 ODD(s(0)) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0) -> c5 P(s(z0)) -> c6 K tuples:none Defined Rule Symbols: cond_2, odd_1, p_1 Defined Pair Symbols: COND_2, ODD_1, P_1 Compound Symbols: c_2, c1_4, c2, c3, c4_1, c5, c6 ---------------------------------------- (13) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (14) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0) -> c2 ODD(s(0)) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0) -> c5 P(s(z0)) -> c6 The (relative) TRS S consists of the following rules: cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0) -> false odd(s(0)) -> true odd(s(s(z0))) -> odd(z0) p(0) -> 0 p(s(z0)) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0') -> c2 ODD(s(0')) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0') -> c5 P(s(z0)) -> c6 The (relative) TRS S consists of the following rules: cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0') -> false odd(s(0')) -> true odd(s(s(z0))) -> odd(z0) p(0') -> 0' p(s(z0)) -> z0 Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0') -> c2 ODD(s(0')) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0') -> c5 P(s(z0)) -> c6 cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0') -> false odd(s(0')) -> true odd(s(s(z0))) -> odd(z0) p(0') -> 0' p(s(z0)) -> z0 Types: COND :: true:false -> 0':s -> c:c1 true :: true:false c :: c:c1 -> c2:c3:c4 -> c:c1 odd :: 0':s -> true:false p :: 0':s -> 0':s ODD :: 0':s -> c2:c3:c4 c1 :: c:c1 -> c5:c6 -> c5:c6 -> c5:c6 -> c:c1 P :: 0':s -> c5:c6 0' :: 0':s c2 :: c2:c3:c4 s :: 0':s -> 0':s c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6 c6 :: c5:c6 cond :: true:false -> 0':s -> cond false :: true:false hole_c:c11_7 :: c:c1 hole_true:false2_7 :: true:false hole_0':s3_7 :: 0':s hole_c2:c3:c44_7 :: c2:c3:c4 hole_c5:c65_7 :: c5:c6 hole_cond6_7 :: cond gen_c:c17_7 :: Nat -> c:c1 gen_0':s8_7 :: Nat -> 0':s gen_c2:c3:c49_7 :: Nat -> c2:c3:c4 ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: COND, odd, ODD, cond They will be analysed ascendingly in the following order: odd < COND ODD < COND odd < cond ---------------------------------------- (20) Obligation: Innermost TRS: Rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0') -> c2 ODD(s(0')) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0') -> c5 P(s(z0)) -> c6 cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0') -> false odd(s(0')) -> true odd(s(s(z0))) -> odd(z0) p(0') -> 0' p(s(z0)) -> z0 Types: COND :: true:false -> 0':s -> c:c1 true :: true:false c :: c:c1 -> c2:c3:c4 -> c:c1 odd :: 0':s -> true:false p :: 0':s -> 0':s ODD :: 0':s -> c2:c3:c4 c1 :: c:c1 -> c5:c6 -> c5:c6 -> c5:c6 -> c:c1 P :: 0':s -> c5:c6 0' :: 0':s c2 :: c2:c3:c4 s :: 0':s -> 0':s c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6 c6 :: c5:c6 cond :: true:false -> 0':s -> cond false :: true:false hole_c:c11_7 :: c:c1 hole_true:false2_7 :: true:false hole_0':s3_7 :: 0':s hole_c2:c3:c44_7 :: c2:c3:c4 hole_c5:c65_7 :: c5:c6 hole_cond6_7 :: cond gen_c:c17_7 :: Nat -> c:c1 gen_0':s8_7 :: Nat -> 0':s gen_c2:c3:c49_7 :: Nat -> c2:c3:c4 Generator Equations: gen_c:c17_7(0) <=> hole_c:c11_7 gen_c:c17_7(+(x, 1)) <=> c(gen_c:c17_7(x), c2) gen_0':s8_7(0) <=> 0' gen_0':s8_7(+(x, 1)) <=> s(gen_0':s8_7(x)) gen_c2:c3:c49_7(0) <=> c2 gen_c2:c3:c49_7(+(x, 1)) <=> c4(gen_c2:c3:c49_7(x)) The following defined symbols remain to be analysed: odd, COND, ODD, cond They will be analysed ascendingly in the following order: odd < COND ODD < COND odd < cond ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: odd(gen_0':s8_7(*(2, n11_7))) -> false, rt in Omega(0) Induction Base: odd(gen_0':s8_7(*(2, 0))) ->_R^Omega(0) false Induction Step: odd(gen_0':s8_7(*(2, +(n11_7, 1)))) ->_R^Omega(0) odd(gen_0':s8_7(*(2, n11_7))) ->_IH false We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (22) Obligation: Innermost TRS: Rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0') -> c2 ODD(s(0')) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0') -> c5 P(s(z0)) -> c6 cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0') -> false odd(s(0')) -> true odd(s(s(z0))) -> odd(z0) p(0') -> 0' p(s(z0)) -> z0 Types: COND :: true:false -> 0':s -> c:c1 true :: true:false c :: c:c1 -> c2:c3:c4 -> c:c1 odd :: 0':s -> true:false p :: 0':s -> 0':s ODD :: 0':s -> c2:c3:c4 c1 :: c:c1 -> c5:c6 -> c5:c6 -> c5:c6 -> c:c1 P :: 0':s -> c5:c6 0' :: 0':s c2 :: c2:c3:c4 s :: 0':s -> 0':s c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6 c6 :: c5:c6 cond :: true:false -> 0':s -> cond false :: true:false hole_c:c11_7 :: c:c1 hole_true:false2_7 :: true:false hole_0':s3_7 :: 0':s hole_c2:c3:c44_7 :: c2:c3:c4 hole_c5:c65_7 :: c5:c6 hole_cond6_7 :: cond gen_c:c17_7 :: Nat -> c:c1 gen_0':s8_7 :: Nat -> 0':s gen_c2:c3:c49_7 :: Nat -> c2:c3:c4 Lemmas: odd(gen_0':s8_7(*(2, n11_7))) -> false, rt in Omega(0) Generator Equations: gen_c:c17_7(0) <=> hole_c:c11_7 gen_c:c17_7(+(x, 1)) <=> c(gen_c:c17_7(x), c2) gen_0':s8_7(0) <=> 0' gen_0':s8_7(+(x, 1)) <=> s(gen_0':s8_7(x)) gen_c2:c3:c49_7(0) <=> c2 gen_c2:c3:c49_7(+(x, 1)) <=> c4(gen_c2:c3:c49_7(x)) The following defined symbols remain to be analysed: ODD, COND, cond They will be analysed ascendingly in the following order: ODD < COND ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: ODD(gen_0':s8_7(*(2, n171_7))) -> gen_c2:c3:c49_7(n171_7), rt in Omega(1 + n171_7) Induction Base: ODD(gen_0':s8_7(*(2, 0))) ->_R^Omega(1) c2 Induction Step: ODD(gen_0':s8_7(*(2, +(n171_7, 1)))) ->_R^Omega(1) c4(ODD(gen_0':s8_7(*(2, n171_7)))) ->_IH c4(gen_c2:c3:c49_7(c172_7)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Complex Obligation (BEST) ---------------------------------------- (25) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0') -> c2 ODD(s(0')) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0') -> c5 P(s(z0)) -> c6 cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0') -> false odd(s(0')) -> true odd(s(s(z0))) -> odd(z0) p(0') -> 0' p(s(z0)) -> z0 Types: COND :: true:false -> 0':s -> c:c1 true :: true:false c :: c:c1 -> c2:c3:c4 -> c:c1 odd :: 0':s -> true:false p :: 0':s -> 0':s ODD :: 0':s -> c2:c3:c4 c1 :: c:c1 -> c5:c6 -> c5:c6 -> c5:c6 -> c:c1 P :: 0':s -> c5:c6 0' :: 0':s c2 :: c2:c3:c4 s :: 0':s -> 0':s c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6 c6 :: c5:c6 cond :: true:false -> 0':s -> cond false :: true:false hole_c:c11_7 :: c:c1 hole_true:false2_7 :: true:false hole_0':s3_7 :: 0':s hole_c2:c3:c44_7 :: c2:c3:c4 hole_c5:c65_7 :: c5:c6 hole_cond6_7 :: cond gen_c:c17_7 :: Nat -> c:c1 gen_0':s8_7 :: Nat -> 0':s gen_c2:c3:c49_7 :: Nat -> c2:c3:c4 Lemmas: odd(gen_0':s8_7(*(2, n11_7))) -> false, rt in Omega(0) Generator Equations: gen_c:c17_7(0) <=> hole_c:c11_7 gen_c:c17_7(+(x, 1)) <=> c(gen_c:c17_7(x), c2) gen_0':s8_7(0) <=> 0' gen_0':s8_7(+(x, 1)) <=> s(gen_0':s8_7(x)) gen_c2:c3:c49_7(0) <=> c2 gen_c2:c3:c49_7(+(x, 1)) <=> c4(gen_c2:c3:c49_7(x)) The following defined symbols remain to be analysed: ODD, COND, cond They will be analysed ascendingly in the following order: ODD < COND ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: COND(true, z0) -> c(COND(odd(z0), p(p(p(z0)))), ODD(z0)) COND(true, z0) -> c1(COND(odd(z0), p(p(p(z0)))), P(p(p(z0))), P(p(z0)), P(z0)) ODD(0') -> c2 ODD(s(0')) -> c3 ODD(s(s(z0))) -> c4(ODD(z0)) P(0') -> c5 P(s(z0)) -> c6 cond(true, z0) -> cond(odd(z0), p(p(p(z0)))) odd(0') -> false odd(s(0')) -> true odd(s(s(z0))) -> odd(z0) p(0') -> 0' p(s(z0)) -> z0 Types: COND :: true:false -> 0':s -> c:c1 true :: true:false c :: c:c1 -> c2:c3:c4 -> c:c1 odd :: 0':s -> true:false p :: 0':s -> 0':s ODD :: 0':s -> c2:c3:c4 c1 :: c:c1 -> c5:c6 -> c5:c6 -> c5:c6 -> c:c1 P :: 0':s -> c5:c6 0' :: 0':s c2 :: c2:c3:c4 s :: 0':s -> 0':s c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6 c6 :: c5:c6 cond :: true:false -> 0':s -> cond false :: true:false hole_c:c11_7 :: c:c1 hole_true:false2_7 :: true:false hole_0':s3_7 :: 0':s hole_c2:c3:c44_7 :: c2:c3:c4 hole_c5:c65_7 :: c5:c6 hole_cond6_7 :: cond gen_c:c17_7 :: Nat -> c:c1 gen_0':s8_7 :: Nat -> 0':s gen_c2:c3:c49_7 :: Nat -> c2:c3:c4 Lemmas: odd(gen_0':s8_7(*(2, n11_7))) -> false, rt in Omega(0) ODD(gen_0':s8_7(*(2, n171_7))) -> gen_c2:c3:c49_7(n171_7), rt in Omega(1 + n171_7) Generator Equations: gen_c:c17_7(0) <=> hole_c:c11_7 gen_c:c17_7(+(x, 1)) <=> c(gen_c:c17_7(x), c2) gen_0':s8_7(0) <=> 0' gen_0':s8_7(+(x, 1)) <=> s(gen_0':s8_7(x)) gen_c2:c3:c49_7(0) <=> c2 gen_c2:c3:c49_7(+(x, 1)) <=> c4(gen_c2:c3:c49_7(x)) The following defined symbols remain to be analysed: COND, cond