WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, 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), 5 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 651 ms] (10) BOUNDS(1, n^1) (11) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CpxTRS (13) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (14) typed CpxTrs (15) OrderProof [LOWER BOUND(ID), 0 ms] (16) typed CpxTrs (17) RewriteLemmaProof [LOWER BOUND(ID), 236 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: cond1(true, x, y) -> cond2(gr(x, 0), x, y) cond2(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), p(x), y) cond2(false, x, y) -> cond3(gr(y, 0), x, y) cond3(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, p(y)) cond3(false, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, y) gr(0, x) -> false gr(s(x), 0) -> true gr(s(x), s(y)) -> gr(x, y) or(false, false) -> false or(true, x) -> true or(x, true) -> true p(0) -> 0 p(s(x)) -> x S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, 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^1). The TRS R consists of the following rules: cond1(true, x, y) -> cond2(gr(x, 0), x, y) [1] cond2(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), p(x), y) [1] cond2(false, x, y) -> cond3(gr(y, 0), x, y) [1] cond3(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, p(y)) [1] cond3(false, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, y) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] or(false, false) -> false [1] or(true, x) -> true [1] or(x, true) -> true [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: cond1(true, x, y) -> cond2(gr(x, 0), x, y) [1] cond2(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), p(x), y) [1] cond2(false, x, y) -> cond3(gr(y, 0), x, y) [1] cond3(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, p(y)) [1] cond3(false, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, y) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] or(false, false) -> false [1] or(true, x) -> true [1] or(x, true) -> true [1] p(0) -> 0 [1] p(s(x)) -> x [1] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> cond1:cond2:cond3 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> cond1:cond2:cond3 gr :: 0:s -> 0:s -> true:false 0 :: 0:s or :: true:false -> true:false -> true:false p :: 0:s -> 0:s false :: true:false cond3 :: true:false -> 0:s -> 0:s -> cond1:cond2:cond3 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: cond1(v0, v1, v2) -> null_cond1 [0] And the following fresh constants: null_cond1 ---------------------------------------- (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: cond1(true, x, y) -> cond2(gr(x, 0), x, y) [1] cond2(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), p(x), y) [1] cond2(false, x, y) -> cond3(gr(y, 0), x, y) [1] cond3(true, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, p(y)) [1] cond3(false, x, y) -> cond1(or(gr(x, 0), gr(y, 0)), x, y) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] or(false, false) -> false [1] or(true, x) -> true [1] or(x, true) -> true [1] p(0) -> 0 [1] p(s(x)) -> x [1] cond1(v0, v1, v2) -> null_cond1 [0] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> null_cond1 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> null_cond1 gr :: 0:s -> 0:s -> true:false 0 :: 0:s or :: true:false -> true:false -> true:false p :: 0:s -> 0:s false :: true:false cond3 :: true:false -> 0:s -> 0:s -> null_cond1 s :: 0:s -> 0:s null_cond1 :: null_cond1 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_cond1 => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: cond1(z, z', z'') -{ 1 }-> cond2(gr(x, 0), x, y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 cond1(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 cond2(z, z', z'') -{ 1 }-> cond3(gr(y, 0), x, y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 cond2(z, z', z'') -{ 1 }-> cond1(or(gr(x, 0), gr(y, 0)), p(x), y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 cond3(z, z', z'') -{ 1 }-> cond1(or(gr(x, 0), gr(y, 0)), x, y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 cond3(z, z', z'') -{ 1 }-> cond1(or(gr(x, 0), gr(y, 0)), x, p(y)) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 gr(z, z') -{ 1 }-> gr(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x gr(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 gr(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 or(z, z') -{ 1 }-> 1 :|: z' = x, z = 1, x >= 0 or(z, z') -{ 1 }-> 1 :|: x >= 0, z' = 1, z = x or(z, z') -{ 1 }-> 0 :|: z = 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, V2),0,[cond1(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[cond2(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[cond3(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[gr(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[or(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[p(V1, Out)],[V1 >= 0]). eq(cond1(V1, V, V2, Out),1,[gr(V4, 0, Ret0),cond2(Ret0, V4, V3, Ret)],[Out = Ret,V = V4,V2 = V3,V1 = 1,V4 >= 0,V3 >= 0]). eq(cond2(V1, V, V2, Out),1,[gr(V5, 0, Ret00),gr(V6, 0, Ret01),or(Ret00, Ret01, Ret02),p(V5, Ret1),cond1(Ret02, Ret1, V6, Ret2)],[Out = Ret2,V = V5,V2 = V6,V1 = 1,V5 >= 0,V6 >= 0]). eq(cond2(V1, V, V2, Out),1,[gr(V7, 0, Ret03),cond3(Ret03, V8, V7, Ret3)],[Out = Ret3,V = V8,V2 = V7,V8 >= 0,V7 >= 0,V1 = 0]). eq(cond3(V1, V, V2, Out),1,[gr(V9, 0, Ret001),gr(V10, 0, Ret011),or(Ret001, Ret011, Ret04),p(V10, Ret21),cond1(Ret04, V9, Ret21, Ret4)],[Out = Ret4,V = V9,V2 = V10,V1 = 1,V9 >= 0,V10 >= 0]). eq(cond3(V1, V, V2, Out),1,[gr(V12, 0, Ret002),gr(V11, 0, Ret012),or(Ret002, Ret012, Ret05),cond1(Ret05, V12, V11, Ret5)],[Out = Ret5,V = V12,V2 = V11,V12 >= 0,V11 >= 0,V1 = 0]). eq(gr(V1, V, Out),1,[],[Out = 0,V = V13,V13 >= 0,V1 = 0]). eq(gr(V1, V, Out),1,[],[Out = 1,V14 >= 0,V1 = 1 + V14,V = 0]). eq(gr(V1, V, Out),1,[gr(V16, V15, Ret6)],[Out = Ret6,V = 1 + V15,V16 >= 0,V15 >= 0,V1 = 1 + V16]). eq(or(V1, V, Out),1,[],[Out = 0,V1 = 0,V = 0]). eq(or(V1, V, Out),1,[],[Out = 1,V = V17,V1 = 1,V17 >= 0]). eq(or(V1, V, Out),1,[],[Out = 1,V18 >= 0,V = 1,V1 = V18]). eq(p(V1, Out),1,[],[Out = 0,V1 = 0]). eq(p(V1, Out),1,[],[Out = V19,V19 >= 0,V1 = 1 + V19]). eq(cond1(V1, V, V2, Out),0,[],[Out = 0,V21 >= 0,V2 = V22,V20 >= 0,V1 = V21,V = V20,V22 >= 0]). input_output_vars(cond1(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(cond2(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(cond3(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(gr(V1,V,Out),[V1,V],[Out]). input_output_vars(or(V1,V,Out),[V1,V],[Out]). input_output_vars(p(V1,Out),[V1],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [gr/3] 1. non_recursive : [or/3] 2. non_recursive : [p/2] 3. recursive : [cond1/4,cond2/4,cond3/4] 4. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into gr/3 1. SCC is partially evaluated into or/3 2. SCC is partially evaluated into p/2 3. SCC is partially evaluated into cond1/4 4. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations gr/3 * CE 12 is refined into CE [22] * CE 11 is refined into CE [23] * CE 10 is refined into CE [24] ### Cost equations --> "Loop" of gr/3 * CEs [23] --> Loop 14 * CEs [24] --> Loop 15 * CEs [22] --> Loop 16 ### Ranking functions of CR gr(V1,V,Out) * RF of phase [16]: [V,V1] #### Partial ranking functions of CR gr(V1,V,Out) * Partial RF of phase [16]: - RF of loop [16:1]: V V1 ### Specialization of cost equations or/3 * CE 15 is refined into CE [25] * CE 14 is refined into CE [26] * CE 13 is refined into CE [27] ### Cost equations --> "Loop" of or/3 * CEs [25] --> Loop 17 * CEs [26] --> Loop 18 * CEs [27] --> Loop 19 ### Ranking functions of CR or(V1,V,Out) #### Partial ranking functions of CR or(V1,V,Out) ### Specialization of cost equations p/2 * CE 17 is refined into CE [28] * CE 16 is refined into CE [29] ### Cost equations --> "Loop" of p/2 * CEs [28] --> Loop 20 * CEs [29] --> Loop 21 ### Ranking functions of CR p(V1,Out) #### Partial ranking functions of CR p(V1,Out) ### Specialization of cost equations cond1/4 * CE 21 is refined into CE [30] * CE 18 is refined into CE [31,32,33] * CE 19 is refined into CE [34] * CE 20 is refined into CE [35] ### Cost equations --> "Loop" of cond1/4 * CEs [32,33] --> Loop 22 * CEs [31] --> Loop 23 * CEs [34] --> Loop 24 * CEs [35] --> Loop 25 * CEs [30] --> Loop 26 ### Ranking functions of CR cond1(V1,V,V2,Out) * RF of phase [22]: [V] * RF of phase [23]: [V] * RF of phase [24]: [V2] #### Partial ranking functions of CR cond1(V1,V,V2,Out) * Partial RF of phase [22]: - RF of loop [22:1]: V * Partial RF of phase [23]: - RF of loop [23:1]: V * Partial RF of phase [24]: - RF of loop [24:1]: V2 ### Specialization of cost equations start/3 * CE 1 is refined into CE [36,37,38,39,40,41,42,43,44,45,46] * CE 5 is refined into CE [47,48,49,50,51,52,53,54,55,56,57] * CE 2 is refined into CE [58,59,60,61,62,63,64,65] * CE 3 is refined into CE [66,67,68] * CE 4 is refined into CE [69,70,71,72,73,74,75,76,77] * CE 6 is refined into CE [78,79,80,81] * CE 7 is refined into CE [82,83,84,85] * CE 8 is refined into CE [86,87,88] * CE 9 is refined into CE [89,90] ### Cost equations --> "Loop" of start/3 * CEs [53,56] --> Loop 27 * CEs [39,40,50,51,78,80] --> Loop 28 * CEs [42,45,88] --> Loop 29 * CEs [37,38,48,49,79,83] --> Loop 30 * CEs [36,41,43,44,46,47,52,54,55,57,81,84,85,87,90] --> Loop 31 * CEs [58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,82,86,89] --> Loop 32 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) Computing Bounds ===================================== #### Cost of chains of gr(V1,V,Out): * Chain [[16],15]: 1*it(16)+1 Such that:it(16) =< V1 with precondition: [Out=0,V1>=1,V>=V1] * Chain [[16],14]: 1*it(16)+1 Such that:it(16) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [15]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [14]: 1 with precondition: [V=0,Out=1,V1>=1] #### Cost of chains of or(V1,V,Out): * Chain [19]: 1 with precondition: [V1=0,V=0,Out=0] * Chain [18]: 1 with precondition: [V1=1,Out=1,V>=0] * Chain [17]: 1 with precondition: [V=1,Out=1,V1>=0] #### Cost of chains of p(V1,Out): * Chain [21]: 1 with precondition: [V1=0,Out=0] * Chain [20]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of cond1(V1,V,V2,Out): * Chain [[24],26]: 9*it(24)+0 Such that:it(24) =< V2 with precondition: [V1=1,V=0,Out=0,V2>=1] * Chain [[24],25,26]: 9*it(24)+8 Such that:it(24) =< V2 with precondition: [V1=1,V=0,Out=0,V2>=1] * Chain [[23],26]: 7*it(23)+0 Such that:it(23) =< V with precondition: [V1=1,V2=0,Out=0,V>=1] * Chain [[23],25,26]: 7*it(23)+8 Such that:it(23) =< V with precondition: [V1=1,V2=0,Out=0,V>=1] * Chain [[22],[24],26]: 7*it(22)+9*it(24)+0 Such that:it(22) =< V it(24) =< V2 with precondition: [V1=1,Out=0,V>=1,V2>=1] * Chain [[22],[24],25,26]: 7*it(22)+9*it(24)+8 Such that:it(22) =< V it(24) =< V2 with precondition: [V1=1,Out=0,V>=1,V2>=1] * Chain [[22],26]: 7*it(22)+0 Such that:it(22) =< V with precondition: [V1=1,Out=0,V>=1,V2>=1] * Chain [26]: 0 with precondition: [Out=0,V1>=0,V>=0,V2>=0] * Chain [25,26]: 8 with precondition: [V1=1,V=0,V2=0,Out=0] #### Cost of chains of start(V1,V,V2): * Chain [32]: 108*s(11)+140*s(13)+15 Such that:aux(5) =< V aux(6) =< V2 s(13) =< aux(5) s(11) =< aux(6) with precondition: [V1=0] * Chain [31]: 106*s(40)+90*s(41)+1*s(58)+13 Such that:s(58) =< V1 aux(7) =< V aux(8) =< V2 s(40) =< aux(7) s(41) =< aux(8) with precondition: [V1>=1] * Chain [30]: 54*s(61)+13 Such that:aux(9) =< V2 s(61) =< aux(9) with precondition: [V=0,V1>=1] * Chain [29]: 36*s(67)+13 Such that:aux(10) =< V2 s(67) =< aux(10) with precondition: [V=1,V1>=0] * Chain [28]: 42*s(71)+13 Such that:aux(11) =< V s(71) =< aux(11) with precondition: [V1>=0,V>=0,V2>=0] * Chain [27]: 28*s(77)+13 Such that:aux(12) =< V s(77) =< aux(12) with precondition: [V1=1,V2=1,V>=1] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [32] with precondition: [V1=0] - Upper bound: nat(V)*140+15+nat(V2)*108 - Complexity: n * Chain [31] with precondition: [V1>=1] - Upper bound: V1+13+nat(V)*106+nat(V2)*90 - Complexity: n * Chain [30] with precondition: [V=0,V1>=1] - Upper bound: nat(V2)*54+13 - Complexity: n * Chain [29] with precondition: [V=1,V1>=0] - Upper bound: nat(V2)*36+13 - Complexity: n * Chain [28] with precondition: [V1>=0,V>=0,V2>=0] - Upper bound: 42*V+13 - Complexity: n * Chain [27] with precondition: [V1=1,V2=1,V>=1] - Upper bound: 28*V+13 - Complexity: n ### Maximum cost of start(V1,V,V2): max([nat(V2)*54,nat(V2)*90+nat(V)*64+max([V1,nat(V)*34+2+nat(V2)*18])+nat(V)*14+nat(V)*28])+13 Asymptotic class: n * Total analysis performed in 608 ms. ---------------------------------------- (10) BOUNDS(1, n^1) ---------------------------------------- (11) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (12) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: cond1(true, x, y) -> cond2(gr(x, 0'), x, y) cond2(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), p(x), y) cond2(false, x, y) -> cond3(gr(y, 0'), x, y) cond3(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, p(y)) cond3(false, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) or(false, false) -> false or(true, x) -> true or(x, true) -> true p(0') -> 0' p(s(x)) -> x S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (14) Obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(x, 0'), x, y) cond2(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), p(x), y) cond2(false, x, y) -> cond3(gr(y, 0'), x, y) cond3(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, p(y)) cond3(false, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) or(false, false) -> false or(true, x) -> true or(x, true) -> true p(0') -> 0' p(s(x)) -> x Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 gr :: 0':s -> 0':s -> true:false 0' :: 0':s or :: true:false -> true:false -> true:false p :: 0':s -> 0':s false :: true:false cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 s :: 0':s -> 0':s hole_cond1:cond2:cond31_0 :: cond1:cond2:cond3 hole_true:false2_0 :: true:false hole_0':s3_0 :: 0':s gen_0':s4_0 :: Nat -> 0':s ---------------------------------------- (15) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: cond1, cond2, gr, cond3 They will be analysed ascendingly in the following order: cond1 = cond2 gr < cond1 cond1 = cond3 gr < cond2 cond2 = cond3 gr < cond3 ---------------------------------------- (16) Obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(x, 0'), x, y) cond2(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), p(x), y) cond2(false, x, y) -> cond3(gr(y, 0'), x, y) cond3(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, p(y)) cond3(false, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) or(false, false) -> false or(true, x) -> true or(x, true) -> true p(0') -> 0' p(s(x)) -> x Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 gr :: 0':s -> 0':s -> true:false 0' :: 0':s or :: true:false -> true:false -> true:false p :: 0':s -> 0':s false :: true:false cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 s :: 0':s -> 0':s hole_cond1:cond2:cond31_0 :: cond1:cond2:cond3 hole_true:false2_0 :: true:false hole_0':s3_0 :: 0':s gen_0':s4_0 :: Nat -> 0':s Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: gr, cond1, cond2, cond3 They will be analysed ascendingly in the following order: cond1 = cond2 gr < cond1 cond1 = cond3 gr < cond2 cond2 = cond3 gr < cond3 ---------------------------------------- (17) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: gr(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) -> false, rt in Omega(1 + n6_0) Induction Base: gr(gen_0':s4_0(0), gen_0':s4_0(0)) ->_R^Omega(1) false Induction Step: gr(gen_0':s4_0(+(n6_0, 1)), gen_0':s4_0(+(n6_0, 1))) ->_R^Omega(1) gr(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) ->_IH false We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (18) Complex Obligation (BEST) ---------------------------------------- (19) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(x, 0'), x, y) cond2(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), p(x), y) cond2(false, x, y) -> cond3(gr(y, 0'), x, y) cond3(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, p(y)) cond3(false, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) or(false, false) -> false or(true, x) -> true or(x, true) -> true p(0') -> 0' p(s(x)) -> x Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 gr :: 0':s -> 0':s -> true:false 0' :: 0':s or :: true:false -> true:false -> true:false p :: 0':s -> 0':s false :: true:false cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 s :: 0':s -> 0':s hole_cond1:cond2:cond31_0 :: cond1:cond2:cond3 hole_true:false2_0 :: true:false hole_0':s3_0 :: 0':s gen_0':s4_0 :: Nat -> 0':s Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: gr, cond1, cond2, cond3 They will be analysed ascendingly in the following order: cond1 = cond2 gr < cond1 cond1 = cond3 gr < cond2 cond2 = cond3 gr < cond3 ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(x, 0'), x, y) cond2(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), p(x), y) cond2(false, x, y) -> cond3(gr(y, 0'), x, y) cond3(true, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, p(y)) cond3(false, x, y) -> cond1(or(gr(x, 0'), gr(y, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) or(false, false) -> false or(true, x) -> true or(x, true) -> true p(0') -> 0' p(s(x)) -> x Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 gr :: 0':s -> 0':s -> true:false 0' :: 0':s or :: true:false -> true:false -> true:false p :: 0':s -> 0':s false :: true:false cond3 :: true:false -> 0':s -> 0':s -> cond1:cond2:cond3 s :: 0':s -> 0':s hole_cond1:cond2:cond31_0 :: cond1:cond2:cond3 hole_true:false2_0 :: true:false hole_0':s3_0 :: 0':s gen_0':s4_0 :: Nat -> 0':s Lemmas: gr(gen_0':s4_0(n6_0), gen_0':s4_0(n6_0)) -> false, rt in Omega(1 + n6_0) Generator Equations: gen_0':s4_0(0) <=> 0' gen_0':s4_0(+(x, 1)) <=> s(gen_0':s4_0(x)) The following defined symbols remain to be analysed: cond2, cond1, cond3 They will be analysed ascendingly in the following order: cond1 = cond2 cond1 = cond3 cond2 = cond3