WORST_CASE(Omega(n^1),O(n^1)) proof of input_52xlTrBjEI.trs # AProVE Commit ID: aff8ecad908e01718a4c36e68d2e55d5e0f16e15 fuhs 20220216 unpublished The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RelTrsToWeightedTrsProof [UPPER BOUND(ID), 0 ms] (2) CpxWeightedTrs (3) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (4) CpxTypedWeightedTrs (5) CompletionProof [UPPER BOUND(ID), 0 ms] (6) CpxTypedWeightedCompleteTrs (7) CpxTypedWeightedTrsToRntsProof [UPPER BOUND(ID), 0 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 145 ms] (10) BOUNDS(1, n^1) (11) CpxTrsToCdtProof [BOTH BOUNDS(ID, ID), 0 ms] (12) CdtProblem (13) CdtToCpxRelTrsProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxRelTRS (15) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (16) CpxRelTRS (17) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (18) typed CpxTrs (19) OrderProof [LOWER BOUND(ID), 0 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 333 ms] (22) BEST (23) proven lower bound (24) LowerBoundPropagationProof [FINISHED, 0 ms] (25) BOUNDS(n^1, INF) (26) typed CpxTrs (27) RewriteLemmaProof [LOWER BOUND(ID), 114 ms] (28) typed CpxTrs (29) RewriteLemmaProof [LOWER BOUND(ID), 37 ms] (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 88 ms] (32) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) quot(0, s(y)) -> 0 quot(s(x), s(y)) -> s(quot(minus(s(x), s(y)), s(y))) S is empty. Rewrite Strategy: PARALLEL_INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (UPPER BOUND(ID)) Transformed relative TRS to weighted TRS ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxWeightedTrs could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] quot(0, s(y)) -> 0 [1] quot(s(x), s(y)) -> s(quot(minus(s(x), s(y)), s(y))) [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: minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] quot(0, s(y)) -> 0 [1] quot(s(x), s(y)) -> s(quot(minus(s(x), s(y)), s(y))) [1] The TRS has the following type information: minus :: 0:s -> 0:s -> 0:s 0 :: 0:s s :: 0:s -> 0:s le :: 0:s -> 0:s -> true:false true :: true:false false :: true:false quot :: 0: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: minus(v0, v1) -> null_minus [0] quot(v0, v1) -> null_quot [0] le(v0, v1) -> null_le [0] And the following fresh constants: null_minus, null_quot, null_le ---------------------------------------- (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: minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] quot(0, s(y)) -> 0 [1] quot(s(x), s(y)) -> s(quot(minus(s(x), s(y)), s(y))) [1] minus(v0, v1) -> null_minus [0] quot(v0, v1) -> null_quot [0] le(v0, v1) -> null_le [0] The TRS has the following type information: minus :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot 0 :: 0:s:null_minus:null_quot s :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot le :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot -> true:false:null_le true :: true:false:null_le false :: true:false:null_le quot :: 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot -> 0:s:null_minus:null_quot null_minus :: 0:s:null_minus:null_quot null_quot :: 0:s:null_minus:null_quot null_le :: true:false:null_le 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: 0 => 0 true => 2 false => 1 null_minus => 0 null_quot => 0 null_le => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: le(z, z') -{ 1 }-> le(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x le(z, z') -{ 1 }-> 2 :|: y >= 0, z = 0, z' = y le(z, z') -{ 1 }-> 1 :|: x >= 0, z = 1 + x, z' = 0 le(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 minus(z, z') -{ 1 }-> x :|: x >= 0, z = x, z' = 0 minus(z, z') -{ 1 }-> minus(x, y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 quot(z, z') -{ 1 }-> 0 :|: z' = 1 + y, y >= 0, z = 0 quot(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 quot(z, z') -{ 1 }-> 1 + quot(minus(1 + x, 1 + y), 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x Only complete derivations are relevant for the runtime complexity. ---------------------------------------- (9) CompleteCoflocoProof (FINISHED) Transformed the RNTS (where only complete derivations are relevant) into cost relations for CoFloCo: eq(start(V1, V),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V),0,[quot(V1, V, Out)],[V1 >= 0,V >= 0]). eq(minus(V1, V, Out),1,[],[Out = V2,V2 >= 0,V1 = V2,V = 0]). eq(minus(V1, V, Out),1,[minus(V3, V4, Ret)],[Out = Ret,V = 1 + V4,V3 >= 0,V4 >= 0,V1 = 1 + V3]). eq(le(V1, V, Out),1,[],[Out = 2,V5 >= 0,V1 = 0,V = V5]). eq(le(V1, V, Out),1,[],[Out = 1,V6 >= 0,V1 = 1 + V6,V = 0]). eq(le(V1, V, Out),1,[le(V7, V8, Ret1)],[Out = Ret1,V = 1 + V8,V7 >= 0,V8 >= 0,V1 = 1 + V7]). eq(quot(V1, V, Out),1,[],[Out = 0,V = 1 + V9,V9 >= 0,V1 = 0]). eq(quot(V1, V, Out),1,[minus(1 + V11, 1 + V10, Ret10),quot(Ret10, 1 + V10, Ret11)],[Out = 1 + Ret11,V = 1 + V10,V11 >= 0,V10 >= 0,V1 = 1 + V11]). eq(minus(V1, V, Out),0,[],[Out = 0,V13 >= 0,V12 >= 0,V1 = V13,V = V12]). eq(quot(V1, V, Out),0,[],[Out = 0,V15 >= 0,V14 >= 0,V1 = V15,V = V14]). eq(le(V1, V, Out),0,[],[Out = 0,V17 >= 0,V16 >= 0,V1 = V17,V = V16]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(quot(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [le/3] 1. recursive : [minus/3] 2. recursive : [quot/3] 3. non_recursive : [start/2] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into le/3 1. SCC is partially evaluated into minus/3 2. SCC is partially evaluated into quot/3 3. SCC is partially evaluated into start/2 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 10 is refined into CE [14] * CE 8 is refined into CE [15] * CE 7 is refined into CE [16] * CE 9 is refined into CE [17] ### Cost equations --> "Loop" of le/3 * CEs [17] --> Loop 11 * CEs [14] --> Loop 12 * CEs [15] --> Loop 13 * CEs [16] --> Loop 14 ### Ranking functions of CR le(V1,V,Out) * RF of phase [11]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [11]: - RF of loop [11:1]: V V1 ### Specialization of cost equations minus/3 * CE 6 is refined into CE [18] * CE 4 is refined into CE [19] * CE 5 is refined into CE [20] ### Cost equations --> "Loop" of minus/3 * CEs [20] --> Loop 15 * CEs [18] --> Loop 16 * CEs [19] --> Loop 17 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [15]: [V,V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [15]: - RF of loop [15:1]: V V1 ### Specialization of cost equations quot/3 * CE 11 is refined into CE [21] * CE 13 is refined into CE [22] * CE 12 is refined into CE [23,24] ### Cost equations --> "Loop" of quot/3 * CEs [24] --> Loop 18 * CEs [23] --> Loop 19 * CEs [21,22] --> Loop 20 ### Ranking functions of CR quot(V1,V,Out) * RF of phase [18]: [V1,V1-V+1] #### Partial ranking functions of CR quot(V1,V,Out) * Partial RF of phase [18]: - RF of loop [18:1]: V1 V1-V+1 ### Specialization of cost equations start/2 * CE 1 is refined into CE [25,26,27] * CE 2 is refined into CE [28,29,30,31,32] * CE 3 is refined into CE [33,34,35] ### Cost equations --> "Loop" of start/2 * CEs [25,29] --> Loop 21 * CEs [26,27,28,30,31,32,33,34,35] --> Loop 22 ### Ranking functions of CR start(V1,V) #### Partial ranking functions of CR start(V1,V) Computing Bounds ===================================== #### Cost of chains of le(V1,V,Out): * Chain [[11],14]: 1*it(11)+1 Such that:it(11) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[11],13]: 1*it(11)+1 Such that:it(11) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[11],12]: 1*it(11)+0 Such that:it(11) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [14]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [13]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [12]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of minus(V1,V,Out): * Chain [[15],17]: 1*it(15)+1 Such that:it(15) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [[15],16]: 1*it(15)+0 Such that:it(15) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [17]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [16]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of quot(V1,V,Out): * Chain [[18],20]: 2*it(18)+1*s(5)+1 Such that:it(18) =< V1-V+1 aux(3) =< V1 it(18) =< aux(3) s(5) =< aux(3) with precondition: [V>=1,Out>=1,V1+1>=Out+V] * Chain [[18],19,20]: 3*it(18)+1*s(6)+2 Such that:s(6) =< V aux(4) =< V1 it(18) =< aux(4) with precondition: [V>=1,Out>=2,V1+1>=Out+V] * Chain [20]: 1 with precondition: [Out=0,V1>=0,V>=0] * Chain [19,20]: 1*s(6)+2 Such that:s(6) =< V with precondition: [Out=1,V1>=1,V>=1] #### Cost of chains of start(V1,V): * Chain [22]: 6*s(13)+5*s(17)+2*s(19)+2 Such that:s(19) =< V1-V+1 aux(6) =< V1 aux(7) =< V s(17) =< aux(6) s(13) =< aux(7) s(19) =< aux(6) with precondition: [V1>=0,V>=0] * Chain [21]: 1 with precondition: [V=0,V1>=0] Closed-form bounds of start(V1,V): ------------------------------------- * Chain [22] with precondition: [V1>=0,V>=0] - Upper bound: 5*V1+6*V+2+nat(V1-V+1)*2 - Complexity: n * Chain [21] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant ### Maximum cost of start(V1,V): 5*V1+6*V+1+nat(V1-V+1)*2+1 Asymptotic class: n * Total analysis performed in 200 ms. ---------------------------------------- (10) BOUNDS(1, n^1) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: minus(z0, 0) -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0, s(z0)) -> 0 quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Tuples: MINUS(z0, 0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0, s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) S tuples: MINUS(z0, 0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0, s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) K tuples:none Defined Rule Symbols: minus_2, le_2, quot_2 Defined Pair Symbols: MINUS_2, LE_2, QUOT_2 Compound Symbols: c, c1_1, c2, c3, c4_1, c5, c6_2 ---------------------------------------- (13) CdtToCpxRelTrsProof (BOTH BOUNDS(ID, ID)) Converted S to standard rules, and D \ S as well as R to relative rules. ---------------------------------------- (14) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: MINUS(z0, 0) -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0, z0) -> c2 LE(s(z0), 0) -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0, s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) The (relative) TRS S consists of the following rules: minus(z0, 0) -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0, z0) -> true le(s(z0), 0) -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0, s(z0)) -> 0 quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Rewrite Strategy: INNERMOST ---------------------------------------- (15) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (16) Obligation: The Runtime Complexity (innermost) of the given CpxRelTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) The (relative) TRS S consists of the following rules: minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: MINUS, LE, QUOT, minus, le, quot They will be analysed ascendingly in the following order: MINUS < QUOT minus < QUOT minus < quot ---------------------------------------- (20) Obligation: Innermost TRS: Rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 Generator Equations: gen_c:c16_7(0) <=> c gen_c:c16_7(+(x, 1)) <=> c1(gen_c:c16_7(x)) gen_0':s7_7(0) <=> 0' gen_0':s7_7(+(x, 1)) <=> s(gen_0':s7_7(x)) gen_c2:c3:c48_7(0) <=> c2 gen_c2:c3:c48_7(+(x, 1)) <=> c4(gen_c2:c3:c48_7(x)) gen_c5:c69_7(0) <=> c5 gen_c5:c69_7(+(x, 1)) <=> c6(gen_c5:c69_7(x), c) The following defined symbols remain to be analysed: MINUS, LE, QUOT, minus, le, quot They will be analysed ascendingly in the following order: MINUS < QUOT minus < QUOT minus < quot ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: MINUS(gen_0':s7_7(n11_7), gen_0':s7_7(n11_7)) -> gen_c:c16_7(n11_7), rt in Omega(1 + n11_7) Induction Base: MINUS(gen_0':s7_7(0), gen_0':s7_7(0)) ->_R^Omega(1) c Induction Step: MINUS(gen_0':s7_7(+(n11_7, 1)), gen_0':s7_7(+(n11_7, 1))) ->_R^Omega(1) c1(MINUS(gen_0':s7_7(n11_7), gen_0':s7_7(n11_7))) ->_IH c1(gen_c:c16_7(c12_7)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (22) Complex Obligation (BEST) ---------------------------------------- (23) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 Generator Equations: gen_c:c16_7(0) <=> c gen_c:c16_7(+(x, 1)) <=> c1(gen_c:c16_7(x)) gen_0':s7_7(0) <=> 0' gen_0':s7_7(+(x, 1)) <=> s(gen_0':s7_7(x)) gen_c2:c3:c48_7(0) <=> c2 gen_c2:c3:c48_7(+(x, 1)) <=> c4(gen_c2:c3:c48_7(x)) gen_c5:c69_7(0) <=> c5 gen_c5:c69_7(+(x, 1)) <=> c6(gen_c5:c69_7(x), c) The following defined symbols remain to be analysed: MINUS, LE, QUOT, minus, le, quot They will be analysed ascendingly in the following order: MINUS < QUOT minus < QUOT minus < quot ---------------------------------------- (24) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (25) BOUNDS(n^1, INF) ---------------------------------------- (26) Obligation: Innermost TRS: Rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 Lemmas: MINUS(gen_0':s7_7(n11_7), gen_0':s7_7(n11_7)) -> gen_c:c16_7(n11_7), rt in Omega(1 + n11_7) Generator Equations: gen_c:c16_7(0) <=> c gen_c:c16_7(+(x, 1)) <=> c1(gen_c:c16_7(x)) gen_0':s7_7(0) <=> 0' gen_0':s7_7(+(x, 1)) <=> s(gen_0':s7_7(x)) gen_c2:c3:c48_7(0) <=> c2 gen_c2:c3:c48_7(+(x, 1)) <=> c4(gen_c2:c3:c48_7(x)) gen_c5:c69_7(0) <=> c5 gen_c5:c69_7(+(x, 1)) <=> c6(gen_c5:c69_7(x), c) The following defined symbols remain to be analysed: LE, QUOT, minus, le, quot They will be analysed ascendingly in the following order: minus < QUOT minus < quot ---------------------------------------- (27) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: LE(gen_0':s7_7(n354_7), gen_0':s7_7(n354_7)) -> gen_c2:c3:c48_7(n354_7), rt in Omega(1 + n354_7) Induction Base: LE(gen_0':s7_7(0), gen_0':s7_7(0)) ->_R^Omega(1) c2 Induction Step: LE(gen_0':s7_7(+(n354_7, 1)), gen_0':s7_7(+(n354_7, 1))) ->_R^Omega(1) c4(LE(gen_0':s7_7(n354_7), gen_0':s7_7(n354_7))) ->_IH c4(gen_c2:c3:c48_7(c355_7)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (28) Obligation: Innermost TRS: Rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 Lemmas: MINUS(gen_0':s7_7(n11_7), gen_0':s7_7(n11_7)) -> gen_c:c16_7(n11_7), rt in Omega(1 + n11_7) LE(gen_0':s7_7(n354_7), gen_0':s7_7(n354_7)) -> gen_c2:c3:c48_7(n354_7), rt in Omega(1 + n354_7) Generator Equations: gen_c:c16_7(0) <=> c gen_c:c16_7(+(x, 1)) <=> c1(gen_c:c16_7(x)) gen_0':s7_7(0) <=> 0' gen_0':s7_7(+(x, 1)) <=> s(gen_0':s7_7(x)) gen_c2:c3:c48_7(0) <=> c2 gen_c2:c3:c48_7(+(x, 1)) <=> c4(gen_c2:c3:c48_7(x)) gen_c5:c69_7(0) <=> c5 gen_c5:c69_7(+(x, 1)) <=> c6(gen_c5:c69_7(x), c) The following defined symbols remain to be analysed: minus, QUOT, le, quot They will be analysed ascendingly in the following order: minus < QUOT minus < quot ---------------------------------------- (29) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s7_7(n957_7), gen_0':s7_7(n957_7)) -> gen_0':s7_7(0), rt in Omega(0) Induction Base: minus(gen_0':s7_7(0), gen_0':s7_7(0)) ->_R^Omega(0) gen_0':s7_7(0) Induction Step: minus(gen_0':s7_7(+(n957_7, 1)), gen_0':s7_7(+(n957_7, 1))) ->_R^Omega(0) minus(gen_0':s7_7(n957_7), gen_0':s7_7(n957_7)) ->_IH gen_0':s7_7(0) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (30) Obligation: Innermost TRS: Rules: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 Lemmas: MINUS(gen_0':s7_7(n11_7), gen_0':s7_7(n11_7)) -> gen_c:c16_7(n11_7), rt in Omega(1 + n11_7) LE(gen_0':s7_7(n354_7), gen_0':s7_7(n354_7)) -> gen_c2:c3:c48_7(n354_7), rt in Omega(1 + n354_7) minus(gen_0':s7_7(n957_7), gen_0':s7_7(n957_7)) -> gen_0':s7_7(0), rt in Omega(0) Generator Equations: gen_c:c16_7(0) <=> c gen_c:c16_7(+(x, 1)) <=> c1(gen_c:c16_7(x)) gen_0':s7_7(0) <=> 0' gen_0':s7_7(+(x, 1)) <=> s(gen_0':s7_7(x)) gen_c2:c3:c48_7(0) <=> c2 gen_c2:c3:c48_7(+(x, 1)) <=> c4(gen_c2:c3:c48_7(x)) gen_c5:c69_7(0) <=> c5 gen_c5:c69_7(+(x, 1)) <=> c6(gen_c5:c69_7(x), c) The following defined symbols remain to be analysed: QUOT, le, quot ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s7_7(n2550_7), gen_0':s7_7(n2550_7)) -> true, rt in Omega(0) Induction Base: le(gen_0':s7_7(0), gen_0':s7_7(0)) ->_R^Omega(0) true Induction Step: le(gen_0':s7_7(+(n2550_7, 1)), gen_0':s7_7(+(n2550_7, 1))) ->_R^Omega(0) le(gen_0':s7_7(n2550_7), gen_0':s7_7(n2550_7)) ->_IH true 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: MINUS(z0, 0') -> c MINUS(s(z0), s(z1)) -> c1(MINUS(z0, z1)) LE(0', z0) -> c2 LE(s(z0), 0') -> c3 LE(s(z0), s(z1)) -> c4(LE(z0, z1)) QUOT(0', s(z0)) -> c5 QUOT(s(z0), s(z1)) -> c6(QUOT(minus(s(z0), s(z1)), s(z1)), MINUS(s(z0), s(z1))) minus(z0, 0') -> z0 minus(s(z0), s(z1)) -> minus(z0, z1) le(0', z0) -> true le(s(z0), 0') -> false le(s(z0), s(z1)) -> le(z0, z1) quot(0', s(z0)) -> 0' quot(s(z0), s(z1)) -> s(quot(minus(s(z0), s(z1)), s(z1))) Types: MINUS :: 0':s -> 0':s -> c:c1 0' :: 0':s c :: c:c1 s :: 0':s -> 0':s c1 :: c:c1 -> c:c1 LE :: 0':s -> 0':s -> c2:c3:c4 c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 QUOT :: 0':s -> 0':s -> c5:c6 c5 :: c5:c6 c6 :: c5:c6 -> c:c1 -> c5:c6 minus :: 0':s -> 0':s -> 0':s le :: 0':s -> 0':s -> true:false true :: true:false false :: true:false quot :: 0':s -> 0':s -> 0':s hole_c:c11_7 :: c:c1 hole_0':s2_7 :: 0':s hole_c2:c3:c43_7 :: c2:c3:c4 hole_c5:c64_7 :: c5:c6 hole_true:false5_7 :: true:false gen_c:c16_7 :: Nat -> c:c1 gen_0':s7_7 :: Nat -> 0':s gen_c2:c3:c48_7 :: Nat -> c2:c3:c4 gen_c5:c69_7 :: Nat -> c5:c6 Lemmas: MINUS(gen_0':s7_7(n11_7), gen_0':s7_7(n11_7)) -> gen_c:c16_7(n11_7), rt in Omega(1 + n11_7) LE(gen_0':s7_7(n354_7), gen_0':s7_7(n354_7)) -> gen_c2:c3:c48_7(n354_7), rt in Omega(1 + n354_7) minus(gen_0':s7_7(n957_7), gen_0':s7_7(n957_7)) -> gen_0':s7_7(0), rt in Omega(0) le(gen_0':s7_7(n2550_7), gen_0':s7_7(n2550_7)) -> true, rt in Omega(0) Generator Equations: gen_c:c16_7(0) <=> c gen_c:c16_7(+(x, 1)) <=> c1(gen_c:c16_7(x)) gen_0':s7_7(0) <=> 0' gen_0':s7_7(+(x, 1)) <=> s(gen_0':s7_7(x)) gen_c2:c3:c48_7(0) <=> c2 gen_c2:c3:c48_7(+(x, 1)) <=> c4(gen_c2:c3:c48_7(x)) gen_c5:c69_7(0) <=> c5 gen_c5:c69_7(+(x, 1)) <=> c6(gen_c5:c69_7(x), c) The following defined symbols remain to be analysed: quot