/export/starexec/sandbox/solver/bin/starexec_run_complexity /export/starexec/sandbox/benchmark/theBenchmark.xml /export/starexec/sandbox/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^1)) proof of /export/starexec/sandbox/benchmark/theBenchmark.xml # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 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), 4 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 579 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), 274 ms] (18) BEST (19) proven lower bound (20) LowerBoundPropagationProof [FINISHED, 0 ms] (21) BOUNDS(n^1, INF) (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 78 ms] (24) 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(y, 0), x, y) cond2(true, x, y) -> cond2(gr(y, 0), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0)), x, y) gr(0, x) -> false gr(s(x), 0) -> true gr(s(x), s(y)) -> gr(x, y) p(0) -> 0 p(s(x)) -> x eq(0, 0) -> true eq(s(x), 0) -> false eq(0, s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false 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(y, 0), x, y) [1] cond2(true, x, y) -> cond2(gr(y, 0), p(x), p(y)) [1] cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0)), x, y) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] eq(0, 0) -> true [1] eq(s(x), 0) -> false [1] eq(0, s(x)) -> false [1] eq(s(x), s(y)) -> eq(x, y) [1] and(true, true) -> true [1] and(false, x) -> false [1] and(x, false) -> false [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(y, 0), x, y) [1] cond2(true, x, y) -> cond2(gr(y, 0), p(x), p(y)) [1] cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0)), x, y) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] eq(0, 0) -> true [1] eq(s(x), 0) -> false [1] eq(0, s(x)) -> false [1] eq(s(x), s(y)) -> eq(x, y) [1] and(true, true) -> true [1] and(false, x) -> false [1] and(x, false) -> false [1] The TRS has the following type information: cond1 :: true:false -> 0:s -> 0:s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0:s -> 0:s -> cond1:cond2 gr :: 0:s -> 0:s -> true:false 0 :: 0:s p :: 0:s -> 0:s false :: true:false and :: true:false -> true:false -> true:false eq :: 0:s -> 0:s -> 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: 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(y, 0), x, y) [1] cond2(true, x, y) -> cond2(gr(y, 0), p(x), p(y)) [1] cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0)), x, y) [1] gr(0, x) -> false [1] gr(s(x), 0) -> true [1] gr(s(x), s(y)) -> gr(x, y) [1] p(0) -> 0 [1] p(s(x)) -> x [1] eq(0, 0) -> true [1] eq(s(x), 0) -> false [1] eq(0, s(x)) -> false [1] eq(s(x), s(y)) -> eq(x, y) [1] and(true, true) -> true [1] and(false, x) -> false [1] and(x, false) -> false [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 p :: 0:s -> 0:s false :: true:false and :: true:false -> true:false -> true:false eq :: 0:s -> 0:s -> true:false 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: and(z, z') -{ 1 }-> 1 :|: z = 1, z' = 1 and(z, z') -{ 1 }-> 0 :|: z' = x, x >= 0, z = 0 and(z, z') -{ 1 }-> 0 :|: x >= 0, z = x, z' = 0 cond1(z, z', z'') -{ 1 }-> cond2(gr(y, 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 }-> cond2(gr(y, 0), p(x), p(y)) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 cond2(z, z', z'') -{ 1 }-> cond1(and(eq(x, y), gr(x, 0)), x, y) :|: z' = x, z'' = y, x >= 0, y >= 0, z = 0 eq(z, z') -{ 1 }-> eq(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x eq(z, z') -{ 1 }-> 1 :|: z = 0, z' = 0 eq(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 eq(z, z') -{ 1 }-> 0 :|: z' = 1 + x, x >= 0, z = 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 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,[gr(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[p(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[eq(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[and(V1, V, Out)],[V1 >= 0,V >= 0]). eq(cond1(V1, V, V2, Out),1,[gr(V3, 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(V6, 0, Ret01),p(V5, Ret1),p(V6, Ret2),cond2(Ret01, Ret1, Ret2, Ret3)],[Out = Ret3,V = V5,V2 = V6,V1 = 1,V5 >= 0,V6 >= 0]). eq(cond2(V1, V, V2, Out),1,[eq(V8, V7, Ret00),gr(V8, 0, Ret011),and(Ret00, Ret011, Ret02),cond1(Ret02, V8, V7, Ret4)],[Out = Ret4,V = V8,V2 = V7,V8 >= 0,V7 >= 0,V1 = 0]). eq(gr(V1, V, Out),1,[],[Out = 0,V = V9,V9 >= 0,V1 = 0]). eq(gr(V1, V, Out),1,[],[Out = 1,V10 >= 0,V1 = 1 + V10,V = 0]). eq(gr(V1, V, Out),1,[gr(V12, V11, Ret5)],[Out = Ret5,V = 1 + V11,V12 >= 0,V11 >= 0,V1 = 1 + V12]). eq(p(V1, Out),1,[],[Out = 0,V1 = 0]). eq(p(V1, Out),1,[],[Out = V13,V13 >= 0,V1 = 1 + V13]). eq(eq(V1, V, Out),1,[],[Out = 1,V1 = 0,V = 0]). eq(eq(V1, V, Out),1,[],[Out = 0,V14 >= 0,V1 = 1 + V14,V = 0]). eq(eq(V1, V, Out),1,[],[Out = 0,V = 1 + V15,V15 >= 0,V1 = 0]). eq(eq(V1, V, Out),1,[eq(V17, V16, Ret6)],[Out = Ret6,V = 1 + V16,V17 >= 0,V16 >= 0,V1 = 1 + V17]). eq(and(V1, V, Out),1,[],[Out = 1,V1 = 1,V = 1]). eq(and(V1, V, Out),1,[],[Out = 0,V = V18,V18 >= 0,V1 = 0]). eq(and(V1, V, Out),1,[],[Out = 0,V19 >= 0,V1 = V19,V = 0]). 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(gr(V1,V,Out),[V1,V],[Out]). input_output_vars(p(V1,Out),[V1],[Out]). input_output_vars(eq(V1,V,Out),[V1,V],[Out]). input_output_vars(and(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [and/3] 1. recursive : [eq/3] 2. recursive : [gr/3] 3. non_recursive : [p/2] 4. recursive : [cond1/4,cond2/4] 5. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into and/3 1. SCC is partially evaluated into eq/3 2. SCC is partially evaluated into gr/3 3. SCC is partially evaluated into p/2 4. SCC is partially evaluated into cond2/4 5. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations and/3 * CE 22 is refined into CE [23] * CE 20 is refined into CE [24] * CE 21 is refined into CE [25] ### Cost equations --> "Loop" of and/3 * CEs [23] --> Loop 17 * CEs [24] --> Loop 18 * CEs [25] --> Loop 19 ### Ranking functions of CR and(V1,V,Out) #### Partial ranking functions of CR and(V1,V,Out) ### Specialization of cost equations eq/3 * CE 19 is refined into CE [26] * CE 17 is refined into CE [27] * CE 18 is refined into CE [28] * CE 16 is refined into CE [29] ### Cost equations --> "Loop" of eq/3 * CEs [27] --> Loop 20 * CEs [28] --> Loop 21 * CEs [29] --> Loop 22 * CEs [26] --> Loop 23 ### Ranking functions of CR eq(V1,V,Out) * RF of phase [23]: [V,V1] #### Partial ranking functions of CR eq(V1,V,Out) * Partial RF of phase [23]: - RF of loop [23:1]: V V1 ### Specialization of cost equations gr/3 * CE 10 is refined into CE [30] * CE 9 is refined into CE [31] * CE 8 is refined into CE [32] ### Cost equations --> "Loop" of gr/3 * CEs [31] --> Loop 24 * CEs [32] --> Loop 25 * CEs [30] --> Loop 26 ### Ranking functions of CR gr(V1,V,Out) * RF of phase [26]: [V,V1] #### Partial ranking functions of CR gr(V1,V,Out) * Partial RF of phase [26]: - RF of loop [26:1]: V V1 ### Specialization of cost equations p/2 * CE 15 is refined into CE [33] * CE 14 is refined into CE [34] ### Cost equations --> "Loop" of p/2 * CEs [33] --> Loop 27 * CEs [34] --> Loop 28 ### Ranking functions of CR p(V1,Out) #### Partial ranking functions of CR p(V1,Out) ### Specialization of cost equations cond2/4 * CE 13 is refined into CE [35,36,37,38] * CE 12 is refined into CE [39] * CE 11 is refined into CE [40,41,42,43,44,45,46] ### Cost equations --> "Loop" of cond2/4 * CEs [45] --> Loop 29 * CEs [44] --> Loop 30 * CEs [46] --> Loop 31 * CEs [43] --> Loop 32 * CEs [41,42] --> Loop 33 * CEs [40] --> Loop 34 * CEs [38] --> Loop 35 * CEs [36] --> Loop 36 * CEs [37] --> Loop 37 * CEs [35] --> Loop 38 * CEs [39] --> Loop 39 ### Ranking functions of CR cond2(V1,V,V2,Out) * RF of phase [35]: [V,V2] * RF of phase [37]: [V2] #### Partial ranking functions of CR cond2(V1,V,V2,Out) * Partial RF of phase [35]: - RF of loop [35:1]: V V2 * Partial RF of phase [37]: - RF of loop [37:1]: V2 ### Specialization of cost equations start/3 * CE 1 is refined into CE [47] * CE 2 is refined into CE [48,49,50,51,52,53,54] * CE 3 is refined into CE [55,56,57,58,59,60,61,62,63,64,65,66,67,68] * CE 4 is refined into CE [69,70,71,72] * CE 5 is refined into CE [73,74] * CE 6 is refined into CE [75,76,77,78,79,80] * CE 7 is refined into CE [81,82,83] ### Cost equations --> "Loop" of start/3 * CEs [54,68] --> Loop 40 * CEs [53,67] --> Loop 41 * CEs [52,66] --> Loop 42 * CEs [51,65] --> Loop 43 * CEs [49,64] --> Loop 44 * CEs [63,71,72,74,78,79,80,82] --> Loop 45 * CEs [47,50,62] --> Loop 46 * CEs [48,61,70,77,83] --> Loop 47 * CEs [55,56,57,58,59,60,69,73,75,76,81] --> Loop 48 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) Computing Bounds ===================================== #### Cost of chains of and(V1,V,Out): * Chain [19]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [18]: 1 with precondition: [V1=1,V=1,Out=1] * Chain [17]: 1 with precondition: [V=0,Out=0,V1>=0] #### Cost of chains of eq(V1,V,Out): * Chain [[23],22]: 1*it(23)+1 Such that:it(23) =< V1 with precondition: [Out=1,V1=V,V1>=1] * Chain [[23],21]: 1*it(23)+1 Such that:it(23) =< V1 with precondition: [Out=0,V1>=1,V>=V1+1] * Chain [[23],20]: 1*it(23)+1 Such that:it(23) =< V with precondition: [Out=0,V>=1,V1>=V+1] * Chain [22]: 1 with precondition: [V1=0,V=0,Out=1] * Chain [21]: 1 with precondition: [V1=0,Out=0,V>=1] * Chain [20]: 1 with precondition: [V=0,Out=0,V1>=1] #### Cost of chains of gr(V1,V,Out): * Chain [[26],25]: 1*it(26)+1 Such that:it(26) =< V1 with precondition: [Out=0,V1>=1,V>=V1] * Chain [[26],24]: 1*it(26)+1 Such that:it(26) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [25]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [24]: 1 with precondition: [V=0,Out=1,V1>=1] #### Cost of chains of p(V1,Out): * Chain [28]: 1 with precondition: [V1=0,Out=0] * Chain [27]: 1 with precondition: [V1=Out+1,V1>=1] #### Cost of chains of cond2(V1,V,V2,Out): * Chain [[37],38,34]: 4*it(37)+8 Such that:it(37) =< V2 with precondition: [V1=1,V=0,Out=0,V2>=1] * Chain [[35],[37],38,34]: 4*it(35)+4*it(37)+8 Such that:it(37) =< -V+V2 it(35) =< V with precondition: [V1=1,Out=0,V>=1,V2>=V+1] * Chain [[35],38,34]: 4*it(35)+8 Such that:it(35) =< V with precondition: [V1=1,Out=0,V=V2,V>=1] * Chain [[35],36,34]: 4*it(35)+8 Such that:it(35) =< V with precondition: [V1=1,Out=0,V=V2+1,V>=2] * Chain [[35],36,32]: 4*it(35)+8 Such that:it(35) =< V2 with precondition: [V1=1,Out=0,V2>=1,V>=V2+2] * Chain [39,[35],38,34]: 5*it(35)+14 Such that:aux(1) =< V2 it(35) =< aux(1) with precondition: [V1=0,Out=0,V=V2,V>=1] * Chain [38,34]: 8 with precondition: [V1=1,V=0,V2=0,Out=0] * Chain [36,34]: 8 with precondition: [V1=1,V=1,V2=0,Out=0] * Chain [36,32]: 8 with precondition: [V1=1,V2=0,Out=0,V>=2] * Chain [34]: 4 with precondition: [V1=0,V=0,V2=0,Out=0] * Chain [33]: 4 with precondition: [V1=0,V=0,Out=0,V2>=1] * Chain [32]: 4 with precondition: [V1=0,V2=0,Out=0,V>=1] * Chain [31]: 1*s(2)+4 Such that:s(2) =< V2 with precondition: [V1=0,Out=0,V=V2,V>=1] * Chain [30]: 1*s(3)+4 Such that:s(3) =< V with precondition: [V1=0,Out=0,V>=1,V2>=V+1] * Chain [29]: 1*s(4)+4 Such that:s(4) =< V2 with precondition: [V1=0,Out=0,V2>=1,V>=V2+1] #### Cost of chains of start(V1,V,V2): * Chain [48]: 7*s(9)+1*s(10)+14 Such that:s(10) =< V aux(3) =< V2 s(9) =< aux(3) with precondition: [V1=0] * Chain [47]: 8 with precondition: [V=0,V1>=0] * Chain [46]: 8*s(12)+10 Such that:aux(4) =< V2 s(12) =< aux(4) with precondition: [V1>=0,V>=0,V2>=0] * Chain [45]: 2*s(14)+3*s(15)+8 Such that:aux(5) =< V1 aux(6) =< V s(14) =< aux(5) s(15) =< aux(6) with precondition: [V1>=1] * Chain [44]: 8 with precondition: [V1=1,V2=0,V>=1] * Chain [43]: 8*s(19)+10 Such that:aux(7) =< V2 s(19) =< aux(7) with precondition: [V1=1,V=V2,V>=1] * Chain [42]: 8*s(21)+10 Such that:aux(8) =< V2+1 s(21) =< aux(8) with precondition: [V1=1,V=V2+1,V>=2] * Chain [41]: 8*s(23)+8*s(24)+10 Such that:aux(9) =< -V+V2 aux(10) =< V s(23) =< aux(9) s(24) =< aux(10) with precondition: [V1=1,V>=1,V2>=V+1] * Chain [40]: 8*s(27)+10 Such that:aux(11) =< V2 s(27) =< aux(11) with precondition: [V1=1,V2>=1,V>=V2+2] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [48] with precondition: [V1=0] - Upper bound: nat(V)+14+nat(V2)*7 - Complexity: n * Chain [47] with precondition: [V=0,V1>=0] - Upper bound: 8 - Complexity: constant * Chain [46] with precondition: [V1>=0,V>=0,V2>=0] - Upper bound: 8*V2+10 - Complexity: n * Chain [45] with precondition: [V1>=1] - Upper bound: 2*V1+8+nat(V)*3 - Complexity: n * Chain [44] with precondition: [V1=1,V2=0,V>=1] - Upper bound: 8 - Complexity: constant * Chain [43] with precondition: [V1=1,V=V2,V>=1] - Upper bound: 8*V2+10 - Complexity: n * Chain [42] with precondition: [V1=1,V=V2+1,V>=2] - Upper bound: 8*V2+18 - Complexity: n * Chain [41] with precondition: [V1=1,V>=1,V2>=V+1] - Upper bound: 8*V2+10 - Complexity: n * Chain [40] with precondition: [V1=1,V2>=1,V>=V2+2] - Upper bound: 8*V2+10 - Complexity: n ### Maximum cost of start(V1,V,V2): max([max([nat(V2)*8+2,nat(V2+1)*8+2]),nat(V)+max([nat(V)*2+max([2*V1,nat(V)*5+2+nat(-V+V2)*8]),nat(V2)*7+6])])+8 Asymptotic class: n * Total analysis performed in 484 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(y, 0'), x, y) cond2(true, x, y) -> cond2(gr(y, 0'), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) p(0') -> 0' p(s(x)) -> x eq(0', 0') -> true eq(s(x), 0') -> false eq(0', s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false 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(y, 0'), x, y) cond2(true, x, y) -> cond2(gr(y, 0'), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) p(0') -> 0' p(s(x)) -> x eq(0', 0') -> true eq(s(x), 0') -> false eq(0', s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2 gr :: 0':s -> 0':s -> true:false 0' :: 0':s p :: 0':s -> 0':s false :: true:false and :: true:false -> true:false -> true:false eq :: 0':s -> 0':s -> true:false s :: 0':s -> 0':s hole_cond1:cond21_0 :: cond1:cond2 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, eq They will be analysed ascendingly in the following order: cond1 = cond2 gr < cond1 gr < cond2 eq < cond2 ---------------------------------------- (16) Obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(y, 0'), x, y) cond2(true, x, y) -> cond2(gr(y, 0'), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) p(0') -> 0' p(s(x)) -> x eq(0', 0') -> true eq(s(x), 0') -> false eq(0', s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2 gr :: 0':s -> 0':s -> true:false 0' :: 0':s p :: 0':s -> 0':s false :: true:false and :: true:false -> true:false -> true:false eq :: 0':s -> 0':s -> true:false s :: 0':s -> 0':s hole_cond1:cond21_0 :: cond1:cond2 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, eq They will be analysed ascendingly in the following order: cond1 = cond2 gr < cond1 gr < cond2 eq < cond2 ---------------------------------------- (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(y, 0'), x, y) cond2(true, x, y) -> cond2(gr(y, 0'), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) p(0') -> 0' p(s(x)) -> x eq(0', 0') -> true eq(s(x), 0') -> false eq(0', s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2 gr :: 0':s -> 0':s -> true:false 0' :: 0':s p :: 0':s -> 0':s false :: true:false and :: true:false -> true:false -> true:false eq :: 0':s -> 0':s -> true:false s :: 0':s -> 0':s hole_cond1:cond21_0 :: cond1:cond2 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, eq They will be analysed ascendingly in the following order: cond1 = cond2 gr < cond1 gr < cond2 eq < cond2 ---------------------------------------- (20) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (21) BOUNDS(n^1, INF) ---------------------------------------- (22) Obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(y, 0'), x, y) cond2(true, x, y) -> cond2(gr(y, 0'), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) p(0') -> 0' p(s(x)) -> x eq(0', 0') -> true eq(s(x), 0') -> false eq(0', s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2 gr :: 0':s -> 0':s -> true:false 0' :: 0':s p :: 0':s -> 0':s false :: true:false and :: true:false -> true:false -> true:false eq :: 0':s -> 0':s -> true:false s :: 0':s -> 0':s hole_cond1:cond21_0 :: cond1:cond2 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: eq, cond1, cond2 They will be analysed ascendingly in the following order: cond1 = cond2 eq < cond2 ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: eq(gen_0':s4_0(n295_0), gen_0':s4_0(n295_0)) -> true, rt in Omega(1 + n295_0) Induction Base: eq(gen_0':s4_0(0), gen_0':s4_0(0)) ->_R^Omega(1) true Induction Step: eq(gen_0':s4_0(+(n295_0, 1)), gen_0':s4_0(+(n295_0, 1))) ->_R^Omega(1) eq(gen_0':s4_0(n295_0), gen_0':s4_0(n295_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: cond1(true, x, y) -> cond2(gr(y, 0'), x, y) cond2(true, x, y) -> cond2(gr(y, 0'), p(x), p(y)) cond2(false, x, y) -> cond1(and(eq(x, y), gr(x, 0')), x, y) gr(0', x) -> false gr(s(x), 0') -> true gr(s(x), s(y)) -> gr(x, y) p(0') -> 0' p(s(x)) -> x eq(0', 0') -> true eq(s(x), 0') -> false eq(0', s(x)) -> false eq(s(x), s(y)) -> eq(x, y) and(true, true) -> true and(false, x) -> false and(x, false) -> false Types: cond1 :: true:false -> 0':s -> 0':s -> cond1:cond2 true :: true:false cond2 :: true:false -> 0':s -> 0':s -> cond1:cond2 gr :: 0':s -> 0':s -> true:false 0' :: 0':s p :: 0':s -> 0':s false :: true:false and :: true:false -> true:false -> true:false eq :: 0':s -> 0':s -> true:false s :: 0':s -> 0':s hole_cond1:cond21_0 :: cond1:cond2 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) eq(gen_0':s4_0(n295_0), gen_0':s4_0(n295_0)) -> true, rt in Omega(1 + n295_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 They will be analysed ascendingly in the following order: cond1 = cond2