/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- 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 CpxRelTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 172 ms] (2) CpxRelTRS (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxWeightedTrs (5) CpxWeightedTrsRenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxWeightedTrs (7) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (8) CpxTypedWeightedTrs (9) CompletionProof [UPPER BOUND(ID), 0 ms] (10) CpxTypedWeightedCompleteTrs (11) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (12) CpxRNTS (13) CompleteCoflocoProof [FINISHED, 375 ms] (14) BOUNDS(1, n^1) (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), 0 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 237 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 71 ms] (24) proven lower bound (25) LowerBoundPropagationProof [FINISHED, 0 ms] (26) BOUNDS(n^1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (1) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0, y) -> True <=(S(x), 0) -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (3) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (4) 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: merge(Cons(x, xs), Nil) -> Cons(x, xs) [1] merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) [1] merge(Nil, ys) -> ys [1] goal(xs, ys) -> merge(xs, ys) [1] <=(S(x), S(y)) -> <=(x, y) [0] <=(0, y) -> True [0] <=(S(x), 0) -> False [0] merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) [0] merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (5) CpxWeightedTrsRenamingProof (BOTH BOUNDS(ID, ID)) Renamed defined symbols to avoid conflicts with arithmetic symbols: <= => lteq ---------------------------------------- (6) 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: merge(Cons(x, xs), Nil) -> Cons(x, xs) [1] merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](lteq(x', x), Cons(x', xs'), Cons(x, xs)) [1] merge(Nil, ys) -> ys [1] goal(xs, ys) -> merge(xs, ys) [1] lteq(S(x), S(y)) -> lteq(x, y) [0] lteq(0, y) -> True [0] lteq(S(x), 0) -> False [0] merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) [0] merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) [0] Rewrite Strategy: INNERMOST ---------------------------------------- (7) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (8) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) [1] merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](lteq(x', x), Cons(x', xs'), Cons(x, xs)) [1] merge(Nil, ys) -> ys [1] goal(xs, ys) -> merge(xs, ys) [1] lteq(S(x), S(y)) -> lteq(x, y) [0] lteq(0, y) -> True [0] lteq(S(x), 0) -> False [0] merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) [0] merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) [0] The TRS has the following type information: merge :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0 -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil merge[Ite] :: True:False -> Cons:Nil -> Cons:Nil -> Cons:Nil lteq :: S:0 -> S:0 -> True:False goal :: Cons:Nil -> Cons:Nil -> Cons:Nil S :: S:0 -> S:0 0 :: S:0 True :: True:False False :: True:False Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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: lteq(v0, v1) -> null_lteq [0] merge[Ite](v0, v1, v2) -> null_merge[Ite] [0] merge(v0, v1) -> null_merge [0] And the following fresh constants: null_lteq, null_merge[Ite], null_merge ---------------------------------------- (10) 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: merge(Cons(x, xs), Nil) -> Cons(x, xs) [1] merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](lteq(x', x), Cons(x', xs'), Cons(x, xs)) [1] merge(Nil, ys) -> ys [1] goal(xs, ys) -> merge(xs, ys) [1] lteq(S(x), S(y)) -> lteq(x, y) [0] lteq(0, y) -> True [0] lteq(S(x), 0) -> False [0] merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) [0] merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) [0] lteq(v0, v1) -> null_lteq [0] merge[Ite](v0, v1, v2) -> null_merge[Ite] [0] merge(v0, v1) -> null_merge [0] The TRS has the following type information: merge :: Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge Cons :: S:0 -> Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge Nil :: Cons:Nil:null_merge[Ite]:null_merge merge[Ite] :: True:False:null_lteq -> Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge lteq :: S:0 -> S:0 -> True:False:null_lteq goal :: Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge -> Cons:Nil:null_merge[Ite]:null_merge S :: S:0 -> S:0 0 :: S:0 True :: True:False:null_lteq False :: True:False:null_lteq null_lteq :: True:False:null_lteq null_merge[Ite] :: Cons:Nil:null_merge[Ite]:null_merge null_merge :: Cons:Nil:null_merge[Ite]:null_merge Rewrite Strategy: INNERMOST ---------------------------------------- (11) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: Nil => 0 0 => 0 True => 2 False => 1 null_lteq => 0 null_merge[Ite] => 0 null_merge => 0 ---------------------------------------- (12) Obligation: Complexity RNTS consisting of the following rules: goal(z, z') -{ 1 }-> merge(xs, ys) :|: xs >= 0, z = xs, z' = ys, ys >= 0 lteq(z, z') -{ 0 }-> lteq(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x lteq(z, z') -{ 0 }-> 2 :|: y >= 0, z = 0, z' = y lteq(z, z') -{ 0 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 lteq(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 merge(z, z') -{ 1 }-> ys :|: z' = ys, ys >= 0, z = 0 merge(z, z') -{ 1 }-> merge[Ite](lteq(x', x), 1 + x' + xs', 1 + x + xs) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z = 1 + x' + xs' merge(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 merge(z, z') -{ 1 }-> 1 + x + xs :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0 merge[Ite](z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 merge[Ite](z, z', z'') -{ 0 }-> 1 + x + merge(xs, ys) :|: z = 2, xs >= 0, z' = 1 + x + xs, ys >= 0, x >= 0, z'' = ys merge[Ite](z, z', z'') -{ 0 }-> 1 + x + merge(xs', xs) :|: xs >= 0, z = 1, xs' >= 0, x >= 0, z' = xs', z'' = 1 + x + xs Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (13) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V, V16),0,[merge(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V16),0,[goal(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V16),0,[lteq(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V16),0,[fun(V1, V, V16, Out)],[V1 >= 0,V >= 0,V16 >= 0]). eq(merge(V1, V, Out),1,[],[Out = 1 + V2 + V3,V1 = 1 + V2 + V3,V2 >= 0,V3 >= 0,V = 0]). eq(merge(V1, V, Out),1,[lteq(V7, V5, Ret0),fun(Ret0, 1 + V7 + V4, 1 + V5 + V6, Ret)],[Out = Ret,V6 >= 0,V = 1 + V5 + V6,V7 >= 0,V4 >= 0,V5 >= 0,V1 = 1 + V4 + V7]). eq(merge(V1, V, Out),1,[],[Out = V8,V = V8,V8 >= 0,V1 = 0]). eq(goal(V1, V, Out),1,[merge(V9, V10, Ret1)],[Out = Ret1,V9 >= 0,V1 = V9,V = V10,V10 >= 0]). eq(lteq(V1, V, Out),0,[lteq(V11, V12, Ret2)],[Out = Ret2,V = 1 + V12,V11 >= 0,V12 >= 0,V1 = 1 + V11]). eq(lteq(V1, V, Out),0,[],[Out = 2,V13 >= 0,V1 = 0,V = V13]). eq(lteq(V1, V, Out),0,[],[Out = 1,V14 >= 0,V1 = 1 + V14,V = 0]). eq(fun(V1, V, V16, Out),0,[merge(V17, V18, Ret11)],[Out = 1 + Ret11 + V15,V18 >= 0,V1 = 1,V17 >= 0,V15 >= 0,V = V17,V16 = 1 + V15 + V18]). eq(fun(V1, V, V16, Out),0,[merge(V19, V21, Ret12)],[Out = 1 + Ret12 + V20,V1 = 2,V19 >= 0,V = 1 + V19 + V20,V21 >= 0,V20 >= 0,V16 = V21]). eq(lteq(V1, V, Out),0,[],[Out = 0,V23 >= 0,V22 >= 0,V1 = V23,V = V22]). eq(fun(V1, V, V16, Out),0,[],[Out = 0,V25 >= 0,V16 = V26,V24 >= 0,V1 = V25,V = V24,V26 >= 0]). eq(merge(V1, V, Out),0,[],[Out = 0,V28 >= 0,V27 >= 0,V1 = V28,V = V27]). input_output_vars(merge(V1,V,Out),[V1,V],[Out]). input_output_vars(goal(V1,V,Out),[V1,V],[Out]). input_output_vars(lteq(V1,V,Out),[V1,V],[Out]). input_output_vars(fun(V1,V,V16,Out),[V1,V,V16],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [lteq/3] 1. recursive : [fun/4,merge/3] 2. non_recursive : [goal/3] 3. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into lteq/3 1. SCC is partially evaluated into merge/3 2. SCC is completely evaluated into other SCCs 3. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations lteq/3 * CE 16 is refined into CE [17] * CE 15 is refined into CE [18] * CE 14 is refined into CE [19] * CE 13 is refined into CE [20] ### Cost equations --> "Loop" of lteq/3 * CEs [20] --> Loop 12 * CEs [17] --> Loop 13 * CEs [18] --> Loop 14 * CEs [19] --> Loop 15 ### Ranking functions of CR lteq(V1,V,Out) * RF of phase [12]: [V,V1] #### Partial ranking functions of CR lteq(V1,V,Out) * Partial RF of phase [12]: - RF of loop [12:1]: V V1 ### Specialization of cost equations merge/3 * CE 7 is refined into CE [21,22,23,24,25] * CE 12 is refined into CE [26] * CE 10 is refined into CE [27] * CE 11 is refined into CE [28] * CE 8 is refined into CE [29,30] * CE 9 is refined into CE [31,32] ### Cost equations --> "Loop" of merge/3 * CEs [29,30] --> Loop 16 * CEs [31,32] --> Loop 17 * CEs [21,22,23,24,25,26] --> Loop 18 * CEs [27] --> Loop 19 * CEs [28] --> Loop 20 ### Ranking functions of CR merge(V1,V,Out) * RF of phase [16,17]: [V1+V-1,V1+2*V-2] #### Partial ranking functions of CR merge(V1,V,Out) * Partial RF of phase [16,17]: - RF of loop [16:1]: V1 - RF of loop [17:1]: V ### Specialization of cost equations start/3 * CE 2 is refined into CE [33,34,35,36,37] * CE 1 is refined into CE [38] * CE 3 is refined into CE [39,40,41,42,43] * CE 4 is refined into CE [44,45,46,47,48] * CE 5 is refined into CE [49,50,51,52,53] * CE 6 is refined into CE [54,55,56,57,58] ### Cost equations --> "Loop" of start/3 * CEs [45,50,55] --> Loop 21 * CEs [33,34,35,36,37] --> Loop 22 * CEs [39,40,41,42,43] --> Loop 23 * CEs [38,44,46,47,48,49,51,52,53,54,56,57,58] --> Loop 24 ### Ranking functions of CR start(V1,V,V16) #### Partial ranking functions of CR start(V1,V,V16) Computing Bounds ===================================== #### Cost of chains of lteq(V1,V,Out): * Chain [[12],15]: 0 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[12],14]: 0 with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[12],13]: 0 with precondition: [Out=0,V1>=1,V>=1] * Chain [15]: 0 with precondition: [V1=0,Out=2,V>=0] * Chain [14]: 0 with precondition: [V=0,Out=1,V1>=1] * Chain [13]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of merge(V1,V,Out): * Chain [[16,17],20]: 1*it(16)+1*it(17)+1 Such that:it(17) =< -V1+Out it(16) =< V1 aux(5) =< -V1+2*Out aux(6) =< Out it(16) =< aux(6) it(17) =< aux(6) it(16) =< aux(5) it(17) =< aux(5) with precondition: [V+V1=Out,V1>=1,V>=1] * Chain [[16,17],19]: 1*it(16)+1*it(17)+1 Such that:it(17) =< -V1+Out it(16) =< V1 aux(7) =< -V1+2*Out aux(8) =< Out it(16) =< aux(8) it(17) =< aux(8) it(16) =< aux(7) it(17) =< aux(7) with precondition: [V+V1=Out,V1>=2,V>=1] * Chain [[16,17],18]: 2*it(16)+1 Such that:aux(1) =< V1+V aux(3) =< V1+2*V aux(9) =< Out aux(10) =< 2*Out it(16) =< aux(9) it(16) =< aux(10) it(16) =< aux(1) it(16) =< aux(3) with precondition: [V1>=1,V>=1,Out>=1,V+V1>=Out+1] * Chain [20]: 1 with precondition: [V1=0,V=Out,V>=0] * Chain [19]: 1 with precondition: [V=0,V1=Out,V1>=1] * Chain [18]: 1 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of start(V1,V,V16): * Chain [24]: 4*s(13)+4*s(14)+4*s(19)+2 Such that:aux(17) =< V1 aux(18) =< V1+V aux(19) =< V1+2*V aux(20) =< 2*V1+2*V aux(21) =< V s(13) =< aux(21) s(14) =< aux(17) s(14) =< aux(18) s(13) =< aux(18) s(14) =< aux(19) s(13) =< aux(19) s(19) =< aux(18) s(19) =< aux(20) s(19) =< aux(19) with precondition: [V1>=0,V>=0] * Chain [23]: 2*s(35)+2*s(36)+2*s(41)+1 Such that:s(33) =< V s(40) =< 2*V+2*V16 s(31) =< V16 aux(23) =< V+V16 aux(24) =< V+2*V16 s(35) =< s(31) s(36) =< s(33) s(36) =< aux(23) s(35) =< aux(23) s(36) =< aux(24) s(35) =< aux(24) s(41) =< aux(23) s(41) =< s(40) s(41) =< aux(24) with precondition: [V1=1,V>=0,V16>=1] * Chain [22]: 2*s(46)+2*s(47)+2*s(52)+1 Such that:s(44) =< V s(51) =< 2*V+2*V16 s(42) =< V16 aux(26) =< V+V16 aux(27) =< V+2*V16 s(46) =< s(42) s(47) =< s(44) s(47) =< aux(26) s(46) =< aux(26) s(47) =< aux(27) s(46) =< aux(27) s(52) =< aux(26) s(52) =< s(51) s(52) =< aux(27) with precondition: [V1=2,V>=1,V16>=0] * Chain [21]: 2 with precondition: [V=0,V1>=1] Closed-form bounds of start(V1,V,V16): ------------------------------------- * Chain [24] with precondition: [V1>=0,V>=0] - Upper bound: 8*V1+8*V+2 - Complexity: n * Chain [23] with precondition: [V1=1,V>=0,V16>=1] - Upper bound: 4*V+4*V16+1 - Complexity: n * Chain [22] with precondition: [V1=2,V>=1,V16>=0] - Upper bound: 4*V+4*V16+1 - Complexity: n * Chain [21] with precondition: [V=0,V1>=1] - Upper bound: 2 - Complexity: constant ### Maximum cost of start(V1,V,V16): max([1,2*V+max([8*V1+6*V+1,nat(V+V16)*2+nat(V16)*2])])+1 Asymptotic class: n * Total analysis performed in 313 ms. ---------------------------------------- (14) BOUNDS(1, n^1) ---------------------------------------- (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: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) The (relative) TRS S consists of the following rules: <=(S(x), S(y)) -> <=(x, y) <=(0', y) -> True <=(S(x), 0') -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) <=(S(x), S(y)) -> <=(x, y) <=(0', y) -> True <=(S(x), 0') -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Types: merge :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil merge[Ite] :: True:False -> Cons:Nil -> Cons:Nil -> Cons:Nil <= :: S:0' -> S:0' -> True:False goal :: Cons:Nil -> Cons:Nil -> Cons:Nil S :: S:0' -> S:0' 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: merge, <= They will be analysed ascendingly in the following order: <= < merge ---------------------------------------- (20) Obligation: Innermost TRS: Rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) <=(S(x), S(y)) -> <=(x, y) <=(0', y) -> True <=(S(x), 0') -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Types: merge :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil merge[Ite] :: True:False -> Cons:Nil -> Cons:Nil -> Cons:Nil <= :: S:0' -> S:0' -> True:False goal :: Cons:Nil -> Cons:Nil -> Cons:Nil S :: S:0' -> S:0' 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: <=, merge They will be analysed ascendingly in the following order: <= < merge ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: <=(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) -> True, rt in Omega(0) Induction Base: <=(gen_S:0'5_0(0), gen_S:0'5_0(0)) ->_R^Omega(0) True Induction Step: <=(gen_S:0'5_0(+(n7_0, 1)), gen_S:0'5_0(+(n7_0, 1))) ->_R^Omega(0) <=(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) ->_IH True 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: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) <=(S(x), S(y)) -> <=(x, y) <=(0', y) -> True <=(S(x), 0') -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Types: merge :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil merge[Ite] :: True:False -> Cons:Nil -> Cons:Nil -> Cons:Nil <= :: S:0' -> S:0' -> True:False goal :: Cons:Nil -> Cons:Nil -> Cons:Nil S :: S:0' -> S:0' 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Lemmas: <=(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) -> True, rt in Omega(0) Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: merge ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: merge(gen_Cons:Nil4_0(n216_0), gen_Cons:Nil4_0(1)) -> gen_Cons:Nil4_0(+(1, n216_0)), rt in Omega(1 + n216_0) Induction Base: merge(gen_Cons:Nil4_0(0), gen_Cons:Nil4_0(1)) ->_R^Omega(1) gen_Cons:Nil4_0(1) Induction Step: merge(gen_Cons:Nil4_0(+(n216_0, 1)), gen_Cons:Nil4_0(1)) ->_R^Omega(1) merge[Ite](<=(0', 0'), Cons(0', gen_Cons:Nil4_0(n216_0)), Cons(0', gen_Cons:Nil4_0(0))) ->_L^Omega(0) merge[Ite](True, Cons(0', gen_Cons:Nil4_0(n216_0)), Cons(0', gen_Cons:Nil4_0(0))) ->_R^Omega(0) Cons(0', merge(gen_Cons:Nil4_0(n216_0), Cons(0', gen_Cons:Nil4_0(0)))) ->_IH Cons(0', gen_Cons:Nil4_0(+(1, c217_0))) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (24) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: merge(Cons(x, xs), Nil) -> Cons(x, xs) merge(Cons(x', xs'), Cons(x, xs)) -> merge[Ite](<=(x', x), Cons(x', xs'), Cons(x, xs)) merge(Nil, ys) -> ys goal(xs, ys) -> merge(xs, ys) <=(S(x), S(y)) -> <=(x, y) <=(0', y) -> True <=(S(x), 0') -> False merge[Ite](False, xs', Cons(x, xs)) -> Cons(x, merge(xs', xs)) merge[Ite](True, Cons(x, xs), ys) -> Cons(x, merge(xs, ys)) Types: merge :: Cons:Nil -> Cons:Nil -> Cons:Nil Cons :: S:0' -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil merge[Ite] :: True:False -> Cons:Nil -> Cons:Nil -> Cons:Nil <= :: S:0' -> S:0' -> True:False goal :: Cons:Nil -> Cons:Nil -> Cons:Nil S :: S:0' -> S:0' 0' :: S:0' True :: True:False False :: True:False hole_Cons:Nil1_0 :: Cons:Nil hole_S:0'2_0 :: S:0' hole_True:False3_0 :: True:False gen_Cons:Nil4_0 :: Nat -> Cons:Nil gen_S:0'5_0 :: Nat -> S:0' Lemmas: <=(gen_S:0'5_0(n7_0), gen_S:0'5_0(n7_0)) -> True, rt in Omega(0) Generator Equations: gen_Cons:Nil4_0(0) <=> Nil gen_Cons:Nil4_0(+(x, 1)) <=> Cons(0', gen_Cons:Nil4_0(x)) gen_S:0'5_0(0) <=> 0' gen_S:0'5_0(+(x, 1)) <=> S(gen_S:0'5_0(x)) The following defined symbols remain to be analysed: merge ---------------------------------------- (25) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (26) BOUNDS(n^1, INF)