WORST_CASE(Omega(n^1),O(n^1)) proof of input_ObdkSMjP8O.trs # AProVE Commit ID: 5b976082cb74a395683ed8cc7acf94bd611ab29f fuhs 20230524 unpublished The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxRelTRS (1) SInnermostTerminationProof [BOTH CONCRETE BOUNDS(ID, ID), 171 ms] (2) CpxRelTRS (3) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (4) CpxWeightedTrs (5) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (6) CpxTypedWeightedTrs (7) CompletionProof [UPPER BOUND(ID), 0 ms] (8) CpxTypedWeightedCompleteTrs (9) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (10) CpxRNTS (11) CompleteCoflocoProof [FINISHED, 307 ms] (12) BOUNDS(1, n^1) (13) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CdtProblem (15) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (18) CpxRelTRS (19) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (20) typed CpxTrs (21) OrderProof [LOWER BOUND(ID), 0 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 404 ms] (24) BEST (25) proven lower bound (26) LowerBoundPropagationProof [FINISHED, 0 ms] (27) BOUNDS(n^1, INF) (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 104 ms] (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 62 ms] (32) typed CpxTrs (33) RewriteLemmaProof [LOWER BOUND(ID), 37 ms] (34) BOUNDS(1, INF) ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: lte(Cons(x', xs'), Cons(x, xs)) -> lte(xs', xs) lte(Cons(x, xs), Nil) -> False even(Cons(x, Nil)) -> False even(Cons(x', Cons(x, xs))) -> even(xs) notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False lte(Nil, y) -> True even(Nil) -> True goal(x, y) -> and(lte(x, y), even(x)) The (relative) TRS S consists of the following rules: and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) SInnermostTerminationProof (BOTH CONCRETE BOUNDS(ID, ID)) proved innermost termination of relative rules ---------------------------------------- (2) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: lte(Cons(x', xs'), Cons(x, xs)) -> lte(xs', xs) lte(Cons(x, xs), Nil) -> False even(Cons(x, Nil)) -> False even(Cons(x', Cons(x, xs))) -> even(xs) notEmpty(Cons(x, xs)) -> True notEmpty(Nil) -> False lte(Nil, y) -> True even(Nil) -> True goal(x, y) -> and(lte(x, y), even(x)) The (relative) TRS S consists of the following rules: and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (3) RelTrsToWeightedTrsProof (UPPER BOUND(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: lte(Cons(x', xs'), Cons(x, xs)) -> lte(xs', xs) [1] lte(Cons(x, xs), Nil) -> False [1] even(Cons(x, Nil)) -> False [1] even(Cons(x', Cons(x, xs))) -> even(xs) [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] lte(Nil, y) -> True [1] even(Nil) -> True [1] goal(x, y) -> and(lte(x, y), even(x)) [1] and(False, False) -> False [0] and(True, False) -> False [0] and(False, True) -> False [0] and(True, True) -> True [0] Rewrite Strategy: INNERMOST ---------------------------------------- (5) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (6) Obligation: Runtime Complexity Weighted TRS with Types. The TRS R consists of the following rules: lte(Cons(x', xs'), Cons(x, xs)) -> lte(xs', xs) [1] lte(Cons(x, xs), Nil) -> False [1] even(Cons(x, Nil)) -> False [1] even(Cons(x', Cons(x, xs))) -> even(xs) [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] lte(Nil, y) -> True [1] even(Nil) -> True [1] goal(x, y) -> and(lte(x, y), even(x)) [1] and(False, False) -> False [0] and(True, False) -> False [0] and(False, True) -> False [0] and(True, True) -> True [0] The TRS has the following type information: lte :: Cons:Nil -> Cons:Nil -> False:True Cons :: a -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil False :: False:True even :: Cons:Nil -> False:True notEmpty :: Cons:Nil -> False:True True :: False:True goal :: Cons:Nil -> Cons:Nil -> False:True and :: False:True -> False:True -> False:True Rewrite Strategy: INNERMOST ---------------------------------------- (7) 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: and(v0, v1) -> null_and [0] And the following fresh constants: null_and, const ---------------------------------------- (8) 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: lte(Cons(x', xs'), Cons(x, xs)) -> lte(xs', xs) [1] lte(Cons(x, xs), Nil) -> False [1] even(Cons(x, Nil)) -> False [1] even(Cons(x', Cons(x, xs))) -> even(xs) [1] notEmpty(Cons(x, xs)) -> True [1] notEmpty(Nil) -> False [1] lte(Nil, y) -> True [1] even(Nil) -> True [1] goal(x, y) -> and(lte(x, y), even(x)) [1] and(False, False) -> False [0] and(True, False) -> False [0] and(False, True) -> False [0] and(True, True) -> True [0] and(v0, v1) -> null_and [0] The TRS has the following type information: lte :: Cons:Nil -> Cons:Nil -> False:True:null_and Cons :: a -> Cons:Nil -> Cons:Nil Nil :: Cons:Nil False :: False:True:null_and even :: Cons:Nil -> False:True:null_and notEmpty :: Cons:Nil -> False:True:null_and True :: False:True:null_and goal :: Cons:Nil -> Cons:Nil -> False:True:null_and and :: False:True:null_and -> False:True:null_and -> False:True:null_and null_and :: False:True:null_and const :: a Rewrite Strategy: INNERMOST ---------------------------------------- (9) 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 False => 1 True => 2 null_and => 0 const => 0 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: and(z, z') -{ 0 }-> 2 :|: z = 2, z' = 2 and(z, z') -{ 0 }-> 1 :|: z = 1, z' = 1 and(z, z') -{ 0 }-> 1 :|: z = 2, z' = 1 and(z, z') -{ 0 }-> 1 :|: z' = 2, z = 1 and(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 even(z) -{ 1 }-> even(xs) :|: xs >= 0, x' >= 0, x >= 0, z = 1 + x' + (1 + x + xs) even(z) -{ 1 }-> 2 :|: z = 0 even(z) -{ 1 }-> 1 :|: x >= 0, z = 1 + x + 0 goal(z, z') -{ 1 }-> and(lte(x, y), even(x)) :|: x >= 0, y >= 0, z = x, z' = y lte(z, z') -{ 1 }-> lte(xs', xs) :|: xs >= 0, z' = 1 + x + xs, x' >= 0, xs' >= 0, x >= 0, z = 1 + x' + xs' lte(z, z') -{ 1 }-> 2 :|: y >= 0, z = 0, z' = y lte(z, z') -{ 1 }-> 1 :|: z = 1 + x + xs, xs >= 0, x >= 0, z' = 0 notEmpty(z) -{ 1 }-> 2 :|: z = 1 + x + xs, xs >= 0, x >= 0 notEmpty(z) -{ 1 }-> 1 :|: z = 0 Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (11) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V2, V),0,[lte(V2, V, Out)],[V2 >= 0,V >= 0]). eq(start(V2, V),0,[even(V2, Out)],[V2 >= 0]). eq(start(V2, V),0,[notEmpty(V2, Out)],[V2 >= 0]). eq(start(V2, V),0,[goal(V2, V, Out)],[V2 >= 0,V >= 0]). eq(start(V2, V),0,[and(V2, V, Out)],[V2 >= 0,V >= 0]). eq(lte(V2, V, Out),1,[lte(V1, V3, Ret)],[Out = Ret,V3 >= 0,V = 1 + V3 + V5,V4 >= 0,V1 >= 0,V5 >= 0,V2 = 1 + V1 + V4]). eq(lte(V2, V, Out),1,[],[Out = 1,V2 = 1 + V6 + V7,V7 >= 0,V6 >= 0,V = 0]). eq(even(V2, Out),1,[],[Out = 1,V8 >= 0,V2 = 1 + V8]). eq(even(V2, Out),1,[even(V10, Ret1)],[Out = Ret1,V10 >= 0,V11 >= 0,V9 >= 0,V2 = 2 + V10 + V11 + V9]). eq(notEmpty(V2, Out),1,[],[Out = 2,V2 = 1 + V12 + V13,V13 >= 0,V12 >= 0]). eq(notEmpty(V2, Out),1,[],[Out = 1,V2 = 0]). eq(lte(V2, V, Out),1,[],[Out = 2,V14 >= 0,V2 = 0,V = V14]). eq(even(V2, Out),1,[],[Out = 2,V2 = 0]). eq(goal(V2, V, Out),1,[lte(V15, V16, Ret0),even(V15, Ret11),and(Ret0, Ret11, Ret2)],[Out = Ret2,V15 >= 0,V16 >= 0,V2 = V15,V = V16]). eq(and(V2, V, Out),0,[],[Out = 1,V2 = 1,V = 1]). eq(and(V2, V, Out),0,[],[Out = 1,V2 = 2,V = 1]). eq(and(V2, V, Out),0,[],[Out = 1,V = 2,V2 = 1]). eq(and(V2, V, Out),0,[],[Out = 2,V2 = 2,V = 2]). eq(and(V2, V, Out),0,[],[Out = 0,V18 >= 0,V17 >= 0,V2 = V18,V = V17]). input_output_vars(lte(V2,V,Out),[V2,V],[Out]). input_output_vars(even(V2,Out),[V2],[Out]). input_output_vars(notEmpty(V2,Out),[V2],[Out]). input_output_vars(goal(V2,V,Out),[V2,V],[Out]). input_output_vars(and(V2,V,Out),[V2,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. non_recursive : [and/3] 1. recursive : [even/2] 2. recursive : [lte/3] 3. non_recursive : [goal/3] 4. non_recursive : [notEmpty/2] 5. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into and/3 1. SCC is partially evaluated into even/2 2. SCC is partially evaluated into lte/3 3. SCC is partially evaluated into goal/3 4. SCC is partially evaluated into notEmpty/2 5. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations and/3 * CE 19 is refined into CE [20] * CE 18 is refined into CE [21] * CE 16 is refined into CE [22] * CE 17 is refined into CE [23] * CE 15 is refined into CE [24] ### Cost equations --> "Loop" of and/3 * CEs [20] --> Loop 16 * CEs [21] --> Loop 17 * CEs [22] --> Loop 18 * CEs [23] --> Loop 19 * CEs [24] --> Loop 20 ### Ranking functions of CR and(V2,V,Out) #### Partial ranking functions of CR and(V2,V,Out) ### Specialization of cost equations even/2 * CE 9 is refined into CE [25] * CE 11 is refined into CE [26] * CE 10 is refined into CE [27] ### Cost equations --> "Loop" of even/2 * CEs [27] --> Loop 21 * CEs [25] --> Loop 22 * CEs [26] --> Loop 23 ### Ranking functions of CR even(V2,Out) * RF of phase [21]: [V2-1] #### Partial ranking functions of CR even(V2,Out) * Partial RF of phase [21]: - RF of loop [21:1]: V2-1 ### Specialization of cost equations lte/3 * CE 7 is refined into CE [28] * CE 8 is refined into CE [29] * CE 6 is refined into CE [30] ### Cost equations --> "Loop" of lte/3 * CEs [30] --> Loop 24 * CEs [28] --> Loop 25 * CEs [29] --> Loop 26 ### Ranking functions of CR lte(V2,V,Out) * RF of phase [24]: [V,V2] #### Partial ranking functions of CR lte(V2,V,Out) * Partial RF of phase [24]: - RF of loop [24:1]: V V2 ### Specialization of cost equations goal/3 * CE 14 is refined into CE [31,32,33,34,35,36,37,38,39,40,41,42,43,44] ### Cost equations --> "Loop" of goal/3 * CEs [43] --> Loop 27 * CEs [37,39,41] --> Loop 28 * CEs [38,40,42,44] --> Loop 29 * CEs [33,35] --> Loop 30 * CEs [34,36] --> Loop 31 * CEs [31] --> Loop 32 * CEs [32] --> Loop 33 ### Ranking functions of CR goal(V2,V,Out) #### Partial ranking functions of CR goal(V2,V,Out) ### Specialization of cost equations notEmpty/2 * CE 12 is refined into CE [45] * CE 13 is refined into CE [46] ### Cost equations --> "Loop" of notEmpty/2 * CEs [45] --> Loop 34 * CEs [46] --> Loop 35 ### Ranking functions of CR notEmpty(V2,Out) #### Partial ranking functions of CR notEmpty(V2,Out) ### Specialization of cost equations start/2 * CE 1 is refined into CE [47,48,49,50] * CE 2 is refined into CE [51,52,53] * CE 3 is refined into CE [54,55] * CE 4 is refined into CE [56,57,58,59,60,61,62] * CE 5 is refined into CE [63,64,65,66,67] ### Cost equations --> "Loop" of start/2 * CEs [48,58,59] --> Loop 36 * CEs [66] --> Loop 37 * CEs [65] --> Loop 38 * CEs [52,53,55,64] --> Loop 39 * CEs [49,50,60,61,62,63,67] --> Loop 40 * CEs [47,51,54,56,57] --> Loop 41 ### Ranking functions of CR start(V2,V) #### Partial ranking functions of CR start(V2,V) Computing Bounds ===================================== #### Cost of chains of and(V2,V,Out): * Chain [20]: 0 with precondition: [V2=1,V=1,Out=1] * Chain [19]: 0 with precondition: [V2=1,V=2,Out=1] * Chain [18]: 0 with precondition: [V2=2,V=1,Out=1] * Chain [17]: 0 with precondition: [V2=2,V=2,Out=2] * Chain [16]: 0 with precondition: [Out=0,V2>=0,V>=0] #### Cost of chains of even(V2,Out): * Chain [[21],23]: 1*it(21)+1 Such that:it(21) =< V2 with precondition: [Out=2,V2>=2] * Chain [[21],22]: 1*it(21)+1 Such that:it(21) =< V2 with precondition: [Out=1,V2>=3] * Chain [23]: 1 with precondition: [V2=0,Out=2] * Chain [22]: 1 with precondition: [Out=1,V2>=1] #### Cost of chains of lte(V2,V,Out): * Chain [[24],26]: 1*it(24)+1 Such that:it(24) =< V with precondition: [Out=2,V2>=1,V>=1] * Chain [[24],25]: 1*it(24)+1 Such that:it(24) =< V with precondition: [Out=1,V2>=2,V>=1] * Chain [26]: 1 with precondition: [V2=0,Out=2,V>=0] * Chain [25]: 1 with precondition: [V=0,Out=1,V2>=1] #### Cost of chains of goal(V2,V,Out): * Chain [33]: 3 with precondition: [V2=0,Out=0,V>=0] * Chain [32]: 3 with precondition: [V2=0,Out=2,V>=0] * Chain [31]: 2*s(2)+3 Such that:aux(1) =< V2 s(2) =< aux(1) with precondition: [V=0,Out=0,V2>=1] * Chain [30]: 2*s(4)+3 Such that:aux(2) =< V2 s(4) =< aux(2) with precondition: [V=0,Out=1,V2>=1] * Chain [29]: 4*s(6)+4*s(7)+3 Such that:aux(3) =< V2 aux(4) =< V s(7) =< aux(3) s(6) =< aux(4) with precondition: [Out=0,V2>=1,V>=1] * Chain [28]: 3*s(14)+3*s(15)+3 Such that:aux(5) =< V2 aux(6) =< V s(15) =< aux(5) s(14) =< aux(6) with precondition: [Out=1,V2>=1,V>=1] * Chain [27]: 1*s(20)+1*s(21)+3 Such that:s(21) =< V2 s(20) =< V with precondition: [Out=2,V2>=2,V>=1] #### Cost of chains of notEmpty(V2,Out): * Chain [35]: 1 with precondition: [V2=0,Out=1] * Chain [34]: 1 with precondition: [Out=2,V2>=1] #### Cost of chains of start(V2,V): * Chain [41]: 3 with precondition: [V2=0] * Chain [40]: 10*s(22)+8*s(26)+3 Such that:aux(7) =< V2 aux(8) =< V s(26) =< aux(7) s(22) =< aux(8) with precondition: [V2>=0,V>=0] * Chain [39]: 2*s(34)+1 Such that:aux(9) =< V2 s(34) =< aux(9) with precondition: [V2>=1] * Chain [38]: 0 with precondition: [V2=2,V=1] * Chain [37]: 0 with precondition: [V2=2,V=2] * Chain [36]: 4*s(37)+3 Such that:aux(10) =< V2 s(37) =< aux(10) with precondition: [V=0,V2>=1] Closed-form bounds of start(V2,V): ------------------------------------- * Chain [41] with precondition: [V2=0] - Upper bound: 3 - Complexity: constant * Chain [40] with precondition: [V2>=0,V>=0] - Upper bound: 8*V2+10*V+3 - Complexity: n * Chain [39] with precondition: [V2>=1] - Upper bound: 2*V2+1 - Complexity: n * Chain [38] with precondition: [V2=2,V=1] - Upper bound: 0 - Complexity: constant * Chain [37] with precondition: [V2=2,V=2] - Upper bound: 0 - Complexity: constant * Chain [36] with precondition: [V=0,V2>=1] - Upper bound: 4*V2+3 - Complexity: n ### Maximum cost of start(V2,V): max([2,nat(V)*10+4*V2+(2*V2+2)+2*V2])+1 Asymptotic class: n * Total analysis performed in 232 ms. ---------------------------------------- (12) BOUNDS(1, n^1) ---------------------------------------- (13) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (14) Obligation: Complexity Dependency Tuples Problem Rules: and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Tuples: AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) S tuples: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) K tuples:none Defined Rule Symbols: lte_2, even_1, notEmpty_1, goal_2, and_2 Defined Pair Symbols: AND_2, LTE_2, EVEN_1, NOTEMPTY_1, GOAL_2 Compound Symbols: c, c1, c2, c3, c4_1, c5, c6, c7, c8_1, c9, c10, c11, c12_2, c13_2 ---------------------------------------- (15) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (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: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) The (relative) TRS S consists of the following rules: AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Rewrite Strategy: INNERMOST ---------------------------------------- (17) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (18) 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: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) The (relative) TRS S consists of the following rules: AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Rewrite Strategy: INNERMOST ---------------------------------------- (19) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (20) Obligation: Innermost TRS: Rules: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Types: LTE :: Cons:Nil -> Cons:Nil -> c4:c5:c6 Cons :: a -> Cons:Nil -> Cons:Nil c4 :: c4:c5:c6 -> c4:c5:c6 Nil :: Cons:Nil c5 :: c4:c5:c6 c6 :: c4:c5:c6 EVEN :: Cons:Nil -> c7:c8:c9 c7 :: c7:c8:c9 c8 :: c7:c8:c9 -> c7:c8:c9 c9 :: c7:c8:c9 NOTEMPTY :: Cons:Nil -> c10:c11 c10 :: c10:c11 c11 :: c10:c11 GOAL :: Cons:Nil -> Cons:Nil -> c12:c13 c12 :: c:c1:c2:c3 -> c4:c5:c6 -> c12:c13 AND :: False:True -> False:True -> c:c1:c2:c3 lte :: Cons:Nil -> Cons:Nil -> False:True even :: Cons:Nil -> False:True c13 :: c:c1:c2:c3 -> c7:c8:c9 -> c12:c13 False :: False:True c :: c:c1:c2:c3 True :: False:True c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 c3 :: c:c1:c2:c3 and :: False:True -> False:True -> False:True notEmpty :: Cons:Nil -> False:True goal :: Cons:Nil -> Cons:Nil -> False:True hole_c4:c5:c61_14 :: c4:c5:c6 hole_Cons:Nil2_14 :: Cons:Nil hole_a3_14 :: a hole_c7:c8:c94_14 :: c7:c8:c9 hole_c10:c115_14 :: c10:c11 hole_c12:c136_14 :: c12:c13 hole_c:c1:c2:c37_14 :: c:c1:c2:c3 hole_False:True8_14 :: False:True gen_c4:c5:c69_14 :: Nat -> c4:c5:c6 gen_Cons:Nil10_14 :: Nat -> Cons:Nil gen_c7:c8:c911_14 :: Nat -> c7:c8:c9 ---------------------------------------- (21) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: LTE, EVEN, lte, even ---------------------------------------- (22) Obligation: Innermost TRS: Rules: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Types: LTE :: Cons:Nil -> Cons:Nil -> c4:c5:c6 Cons :: a -> Cons:Nil -> Cons:Nil c4 :: c4:c5:c6 -> c4:c5:c6 Nil :: Cons:Nil c5 :: c4:c5:c6 c6 :: c4:c5:c6 EVEN :: Cons:Nil -> c7:c8:c9 c7 :: c7:c8:c9 c8 :: c7:c8:c9 -> c7:c8:c9 c9 :: c7:c8:c9 NOTEMPTY :: Cons:Nil -> c10:c11 c10 :: c10:c11 c11 :: c10:c11 GOAL :: Cons:Nil -> Cons:Nil -> c12:c13 c12 :: c:c1:c2:c3 -> c4:c5:c6 -> c12:c13 AND :: False:True -> False:True -> c:c1:c2:c3 lte :: Cons:Nil -> Cons:Nil -> False:True even :: Cons:Nil -> False:True c13 :: c:c1:c2:c3 -> c7:c8:c9 -> c12:c13 False :: False:True c :: c:c1:c2:c3 True :: False:True c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 c3 :: c:c1:c2:c3 and :: False:True -> False:True -> False:True notEmpty :: Cons:Nil -> False:True goal :: Cons:Nil -> Cons:Nil -> False:True hole_c4:c5:c61_14 :: c4:c5:c6 hole_Cons:Nil2_14 :: Cons:Nil hole_a3_14 :: a hole_c7:c8:c94_14 :: c7:c8:c9 hole_c10:c115_14 :: c10:c11 hole_c12:c136_14 :: c12:c13 hole_c:c1:c2:c37_14 :: c:c1:c2:c3 hole_False:True8_14 :: False:True gen_c4:c5:c69_14 :: Nat -> c4:c5:c6 gen_Cons:Nil10_14 :: Nat -> Cons:Nil gen_c7:c8:c911_14 :: Nat -> c7:c8:c9 Generator Equations: gen_c4:c5:c69_14(0) <=> c5 gen_c4:c5:c69_14(+(x, 1)) <=> c4(gen_c4:c5:c69_14(x)) gen_Cons:Nil10_14(0) <=> Nil gen_Cons:Nil10_14(+(x, 1)) <=> Cons(hole_a3_14, gen_Cons:Nil10_14(x)) gen_c7:c8:c911_14(0) <=> c7 gen_c7:c8:c911_14(+(x, 1)) <=> c8(gen_c7:c8:c911_14(x)) The following defined symbols remain to be analysed: LTE, EVEN, lte, even ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LTE(gen_Cons:Nil10_14(+(1, n13_14)), gen_Cons:Nil10_14(n13_14)) -> gen_c4:c5:c69_14(n13_14), rt in Omega(1 + n13_14) Induction Base: LTE(gen_Cons:Nil10_14(+(1, 0)), gen_Cons:Nil10_14(0)) ->_R^Omega(1) c5 Induction Step: LTE(gen_Cons:Nil10_14(+(1, +(n13_14, 1))), gen_Cons:Nil10_14(+(n13_14, 1))) ->_R^Omega(1) c4(LTE(gen_Cons:Nil10_14(+(1, n13_14)), gen_Cons:Nil10_14(n13_14))) ->_IH c4(gen_c4:c5:c69_14(c14_14)) 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: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Types: LTE :: Cons:Nil -> Cons:Nil -> c4:c5:c6 Cons :: a -> Cons:Nil -> Cons:Nil c4 :: c4:c5:c6 -> c4:c5:c6 Nil :: Cons:Nil c5 :: c4:c5:c6 c6 :: c4:c5:c6 EVEN :: Cons:Nil -> c7:c8:c9 c7 :: c7:c8:c9 c8 :: c7:c8:c9 -> c7:c8:c9 c9 :: c7:c8:c9 NOTEMPTY :: Cons:Nil -> c10:c11 c10 :: c10:c11 c11 :: c10:c11 GOAL :: Cons:Nil -> Cons:Nil -> c12:c13 c12 :: c:c1:c2:c3 -> c4:c5:c6 -> c12:c13 AND :: False:True -> False:True -> c:c1:c2:c3 lte :: Cons:Nil -> Cons:Nil -> False:True even :: Cons:Nil -> False:True c13 :: c:c1:c2:c3 -> c7:c8:c9 -> c12:c13 False :: False:True c :: c:c1:c2:c3 True :: False:True c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 c3 :: c:c1:c2:c3 and :: False:True -> False:True -> False:True notEmpty :: Cons:Nil -> False:True goal :: Cons:Nil -> Cons:Nil -> False:True hole_c4:c5:c61_14 :: c4:c5:c6 hole_Cons:Nil2_14 :: Cons:Nil hole_a3_14 :: a hole_c7:c8:c94_14 :: c7:c8:c9 hole_c10:c115_14 :: c10:c11 hole_c12:c136_14 :: c12:c13 hole_c:c1:c2:c37_14 :: c:c1:c2:c3 hole_False:True8_14 :: False:True gen_c4:c5:c69_14 :: Nat -> c4:c5:c6 gen_Cons:Nil10_14 :: Nat -> Cons:Nil gen_c7:c8:c911_14 :: Nat -> c7:c8:c9 Generator Equations: gen_c4:c5:c69_14(0) <=> c5 gen_c4:c5:c69_14(+(x, 1)) <=> c4(gen_c4:c5:c69_14(x)) gen_Cons:Nil10_14(0) <=> Nil gen_Cons:Nil10_14(+(x, 1)) <=> Cons(hole_a3_14, gen_Cons:Nil10_14(x)) gen_c7:c8:c911_14(0) <=> c7 gen_c7:c8:c911_14(+(x, 1)) <=> c8(gen_c7:c8:c911_14(x)) The following defined symbols remain to be analysed: LTE, EVEN, lte, even ---------------------------------------- (26) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (27) BOUNDS(n^1, INF) ---------------------------------------- (28) Obligation: Innermost TRS: Rules: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Types: LTE :: Cons:Nil -> Cons:Nil -> c4:c5:c6 Cons :: a -> Cons:Nil -> Cons:Nil c4 :: c4:c5:c6 -> c4:c5:c6 Nil :: Cons:Nil c5 :: c4:c5:c6 c6 :: c4:c5:c6 EVEN :: Cons:Nil -> c7:c8:c9 c7 :: c7:c8:c9 c8 :: c7:c8:c9 -> c7:c8:c9 c9 :: c7:c8:c9 NOTEMPTY :: Cons:Nil -> c10:c11 c10 :: c10:c11 c11 :: c10:c11 GOAL :: Cons:Nil -> Cons:Nil -> c12:c13 c12 :: c:c1:c2:c3 -> c4:c5:c6 -> c12:c13 AND :: False:True -> False:True -> c:c1:c2:c3 lte :: Cons:Nil -> Cons:Nil -> False:True even :: Cons:Nil -> False:True c13 :: c:c1:c2:c3 -> c7:c8:c9 -> c12:c13 False :: False:True c :: c:c1:c2:c3 True :: False:True c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 c3 :: c:c1:c2:c3 and :: False:True -> False:True -> False:True notEmpty :: Cons:Nil -> False:True goal :: Cons:Nil -> Cons:Nil -> False:True hole_c4:c5:c61_14 :: c4:c5:c6 hole_Cons:Nil2_14 :: Cons:Nil hole_a3_14 :: a hole_c7:c8:c94_14 :: c7:c8:c9 hole_c10:c115_14 :: c10:c11 hole_c12:c136_14 :: c12:c13 hole_c:c1:c2:c37_14 :: c:c1:c2:c3 hole_False:True8_14 :: False:True gen_c4:c5:c69_14 :: Nat -> c4:c5:c6 gen_Cons:Nil10_14 :: Nat -> Cons:Nil gen_c7:c8:c911_14 :: Nat -> c7:c8:c9 Lemmas: LTE(gen_Cons:Nil10_14(+(1, n13_14)), gen_Cons:Nil10_14(n13_14)) -> gen_c4:c5:c69_14(n13_14), rt in Omega(1 + n13_14) Generator Equations: gen_c4:c5:c69_14(0) <=> c5 gen_c4:c5:c69_14(+(x, 1)) <=> c4(gen_c4:c5:c69_14(x)) gen_Cons:Nil10_14(0) <=> Nil gen_Cons:Nil10_14(+(x, 1)) <=> Cons(hole_a3_14, gen_Cons:Nil10_14(x)) gen_c7:c8:c911_14(0) <=> c7 gen_c7:c8:c911_14(+(x, 1)) <=> c8(gen_c7:c8:c911_14(x)) The following defined symbols remain to be analysed: EVEN, lte, even ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: EVEN(gen_Cons:Nil10_14(+(1, *(2, n596_14)))) -> gen_c7:c8:c911_14(n596_14), rt in Omega(1 + n596_14) Induction Base: EVEN(gen_Cons:Nil10_14(+(1, *(2, 0)))) ->_R^Omega(1) c7 Induction Step: EVEN(gen_Cons:Nil10_14(+(1, *(2, +(n596_14, 1))))) ->_R^Omega(1) c8(EVEN(gen_Cons:Nil10_14(+(1, *(2, n596_14))))) ->_IH c8(gen_c7:c8:c911_14(c597_14)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (30) Obligation: Innermost TRS: Rules: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Types: LTE :: Cons:Nil -> Cons:Nil -> c4:c5:c6 Cons :: a -> Cons:Nil -> Cons:Nil c4 :: c4:c5:c6 -> c4:c5:c6 Nil :: Cons:Nil c5 :: c4:c5:c6 c6 :: c4:c5:c6 EVEN :: Cons:Nil -> c7:c8:c9 c7 :: c7:c8:c9 c8 :: c7:c8:c9 -> c7:c8:c9 c9 :: c7:c8:c9 NOTEMPTY :: Cons:Nil -> c10:c11 c10 :: c10:c11 c11 :: c10:c11 GOAL :: Cons:Nil -> Cons:Nil -> c12:c13 c12 :: c:c1:c2:c3 -> c4:c5:c6 -> c12:c13 AND :: False:True -> False:True -> c:c1:c2:c3 lte :: Cons:Nil -> Cons:Nil -> False:True even :: Cons:Nil -> False:True c13 :: c:c1:c2:c3 -> c7:c8:c9 -> c12:c13 False :: False:True c :: c:c1:c2:c3 True :: False:True c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 c3 :: c:c1:c2:c3 and :: False:True -> False:True -> False:True notEmpty :: Cons:Nil -> False:True goal :: Cons:Nil -> Cons:Nil -> False:True hole_c4:c5:c61_14 :: c4:c5:c6 hole_Cons:Nil2_14 :: Cons:Nil hole_a3_14 :: a hole_c7:c8:c94_14 :: c7:c8:c9 hole_c10:c115_14 :: c10:c11 hole_c12:c136_14 :: c12:c13 hole_c:c1:c2:c37_14 :: c:c1:c2:c3 hole_False:True8_14 :: False:True gen_c4:c5:c69_14 :: Nat -> c4:c5:c6 gen_Cons:Nil10_14 :: Nat -> Cons:Nil gen_c7:c8:c911_14 :: Nat -> c7:c8:c9 Lemmas: LTE(gen_Cons:Nil10_14(+(1, n13_14)), gen_Cons:Nil10_14(n13_14)) -> gen_c4:c5:c69_14(n13_14), rt in Omega(1 + n13_14) EVEN(gen_Cons:Nil10_14(+(1, *(2, n596_14)))) -> gen_c7:c8:c911_14(n596_14), rt in Omega(1 + n596_14) Generator Equations: gen_c4:c5:c69_14(0) <=> c5 gen_c4:c5:c69_14(+(x, 1)) <=> c4(gen_c4:c5:c69_14(x)) gen_Cons:Nil10_14(0) <=> Nil gen_Cons:Nil10_14(+(x, 1)) <=> Cons(hole_a3_14, gen_Cons:Nil10_14(x)) gen_c7:c8:c911_14(0) <=> c7 gen_c7:c8:c911_14(+(x, 1)) <=> c8(gen_c7:c8:c911_14(x)) The following defined symbols remain to be analysed: lte, even ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: lte(gen_Cons:Nil10_14(+(1, n1108_14)), gen_Cons:Nil10_14(n1108_14)) -> False, rt in Omega(0) Induction Base: lte(gen_Cons:Nil10_14(+(1, 0)), gen_Cons:Nil10_14(0)) ->_R^Omega(0) False Induction Step: lte(gen_Cons:Nil10_14(+(1, +(n1108_14, 1))), gen_Cons:Nil10_14(+(n1108_14, 1))) ->_R^Omega(0) lte(gen_Cons:Nil10_14(+(1, n1108_14)), gen_Cons:Nil10_14(n1108_14)) ->_IH False We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (32) Obligation: Innermost TRS: Rules: LTE(Cons(z0, z1), Cons(z2, z3)) -> c4(LTE(z1, z3)) LTE(Cons(z0, z1), Nil) -> c5 LTE(Nil, z0) -> c6 EVEN(Cons(z0, Nil)) -> c7 EVEN(Cons(z0, Cons(z1, z2))) -> c8(EVEN(z2)) EVEN(Nil) -> c9 NOTEMPTY(Cons(z0, z1)) -> c10 NOTEMPTY(Nil) -> c11 GOAL(z0, z1) -> c12(AND(lte(z0, z1), even(z0)), LTE(z0, z1)) GOAL(z0, z1) -> c13(AND(lte(z0, z1), even(z0)), EVEN(z0)) AND(False, False) -> c AND(True, False) -> c1 AND(False, True) -> c2 AND(True, True) -> c3 and(False, False) -> False and(True, False) -> False and(False, True) -> False and(True, True) -> True lte(Cons(z0, z1), Cons(z2, z3)) -> lte(z1, z3) lte(Cons(z0, z1), Nil) -> False lte(Nil, z0) -> True even(Cons(z0, Nil)) -> False even(Cons(z0, Cons(z1, z2))) -> even(z2) even(Nil) -> True notEmpty(Cons(z0, z1)) -> True notEmpty(Nil) -> False goal(z0, z1) -> and(lte(z0, z1), even(z0)) Types: LTE :: Cons:Nil -> Cons:Nil -> c4:c5:c6 Cons :: a -> Cons:Nil -> Cons:Nil c4 :: c4:c5:c6 -> c4:c5:c6 Nil :: Cons:Nil c5 :: c4:c5:c6 c6 :: c4:c5:c6 EVEN :: Cons:Nil -> c7:c8:c9 c7 :: c7:c8:c9 c8 :: c7:c8:c9 -> c7:c8:c9 c9 :: c7:c8:c9 NOTEMPTY :: Cons:Nil -> c10:c11 c10 :: c10:c11 c11 :: c10:c11 GOAL :: Cons:Nil -> Cons:Nil -> c12:c13 c12 :: c:c1:c2:c3 -> c4:c5:c6 -> c12:c13 AND :: False:True -> False:True -> c:c1:c2:c3 lte :: Cons:Nil -> Cons:Nil -> False:True even :: Cons:Nil -> False:True c13 :: c:c1:c2:c3 -> c7:c8:c9 -> c12:c13 False :: False:True c :: c:c1:c2:c3 True :: False:True c1 :: c:c1:c2:c3 c2 :: c:c1:c2:c3 c3 :: c:c1:c2:c3 and :: False:True -> False:True -> False:True notEmpty :: Cons:Nil -> False:True goal :: Cons:Nil -> Cons:Nil -> False:True hole_c4:c5:c61_14 :: c4:c5:c6 hole_Cons:Nil2_14 :: Cons:Nil hole_a3_14 :: a hole_c7:c8:c94_14 :: c7:c8:c9 hole_c10:c115_14 :: c10:c11 hole_c12:c136_14 :: c12:c13 hole_c:c1:c2:c37_14 :: c:c1:c2:c3 hole_False:True8_14 :: False:True gen_c4:c5:c69_14 :: Nat -> c4:c5:c6 gen_Cons:Nil10_14 :: Nat -> Cons:Nil gen_c7:c8:c911_14 :: Nat -> c7:c8:c9 Lemmas: LTE(gen_Cons:Nil10_14(+(1, n13_14)), gen_Cons:Nil10_14(n13_14)) -> gen_c4:c5:c69_14(n13_14), rt in Omega(1 + n13_14) EVEN(gen_Cons:Nil10_14(+(1, *(2, n596_14)))) -> gen_c7:c8:c911_14(n596_14), rt in Omega(1 + n596_14) lte(gen_Cons:Nil10_14(+(1, n1108_14)), gen_Cons:Nil10_14(n1108_14)) -> False, rt in Omega(0) Generator Equations: gen_c4:c5:c69_14(0) <=> c5 gen_c4:c5:c69_14(+(x, 1)) <=> c4(gen_c4:c5:c69_14(x)) gen_Cons:Nil10_14(0) <=> Nil gen_Cons:Nil10_14(+(x, 1)) <=> Cons(hole_a3_14, gen_Cons:Nil10_14(x)) gen_c7:c8:c911_14(0) <=> c7 gen_c7:c8:c911_14(+(x, 1)) <=> c8(gen_c7:c8:c911_14(x)) The following defined symbols remain to be analysed: even ---------------------------------------- (33) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: even(gen_Cons:Nil10_14(+(1, *(2, n1475_14)))) -> False, rt in Omega(0) Induction Base: even(gen_Cons:Nil10_14(+(1, *(2, 0)))) ->_R^Omega(0) False Induction Step: even(gen_Cons:Nil10_14(+(1, *(2, +(n1475_14, 1))))) ->_R^Omega(0) even(gen_Cons:Nil10_14(+(1, *(2, n1475_14)))) ->_IH False We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (34) BOUNDS(1, INF)