/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: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). (0) CpxTRS (1) RcToIrcProof [BOTH BOUNDS(ID, ID), 0 ms] (2) CpxTRS (3) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, 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, 502 ms] (12) BOUNDS(1, n^1) (13) RenamingProof [BOTH BOUNDS(ID, ID), 0 ms] (14) CpxTRS (15) TypeInferenceProof [BOTH BOUNDS(ID, ID), 0 ms] (16) typed CpxTrs (17) OrderProof [LOWER BOUND(ID), 0 ms] (18) typed CpxTrs (19) RewriteLemmaProof [LOWER BOUND(ID), 276 ms] (20) BEST (21) proven lower bound (22) LowerBoundPropagationProof [FINISHED, 0 ms] (23) BOUNDS(n^1, INF) (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 29 ms] (26) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) mod(0, y) -> 0 mod(s(x), 0) -> 0 mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) S is empty. Rewrite Strategy: FULL ---------------------------------------- (1) RcToIrcProof (BOTH BOUNDS(ID, ID)) Converted rc-obligation to irc-obligation. The duplicating contexts are: mod(s(x), s([])) mod(s([]), s(y)) if_mod(true, s(x), s([])) The defined contexts are: if_mod([], s(x1), s(x2)) mod([], s(x1)) le(x0, []) if_mod(x0, s([]), s(x2)) minus([], x1) [] just represents basic- or constructor-terms in the following defined contexts: if_mod([], s(x1), s(x2)) mod([], s(x1)) As the TRS is an overlay system and the defined contexts and the duplicating contexts don't overlap, we have rc = irc. ---------------------------------------- (2) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1). The TRS R consists of the following rules: le(0, y) -> true le(s(x), 0) -> false le(s(x), s(y)) -> le(x, y) minus(x, 0) -> x minus(s(x), s(y)) -> minus(x, y) mod(0, y) -> 0 mod(s(x), 0) -> 0 mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) S is empty. 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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(0, y) -> 0 [1] mod(s(x), 0) -> 0 [1] mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) [1] if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) [1] if_mod(false, s(x), s(y)) -> s(x) [1] 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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(0, y) -> 0 [1] mod(s(x), 0) -> 0 [1] mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) [1] if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) [1] if_mod(false, s(x), s(y)) -> s(x) [1] The TRS has the following type information: le :: 0:s -> 0:s -> true:false 0 :: 0:s true :: true:false s :: 0:s -> 0:s false :: true:false minus :: 0:s -> 0:s -> 0:s mod :: 0:s -> 0:s -> 0:s if_mod :: true:false -> 0:s -> 0:s -> 0:s 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: minus(v0, v1) -> null_minus [0] if_mod(v0, v1, v2) -> null_if_mod [0] le(v0, v1) -> null_le [0] mod(v0, v1) -> null_mod [0] And the following fresh constants: null_minus, null_if_mod, null_le, null_mod ---------------------------------------- (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: le(0, y) -> true [1] le(s(x), 0) -> false [1] le(s(x), s(y)) -> le(x, y) [1] minus(x, 0) -> x [1] minus(s(x), s(y)) -> minus(x, y) [1] mod(0, y) -> 0 [1] mod(s(x), 0) -> 0 [1] mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) [1] if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) [1] if_mod(false, s(x), s(y)) -> s(x) [1] minus(v0, v1) -> null_minus [0] if_mod(v0, v1, v2) -> null_if_mod [0] le(v0, v1) -> null_le [0] mod(v0, v1) -> null_mod [0] The TRS has the following type information: le :: 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod -> true:false:null_le 0 :: 0:s:null_minus:null_if_mod:null_mod true :: true:false:null_le s :: 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod false :: true:false:null_le minus :: 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod mod :: 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod if_mod :: true:false:null_le -> 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod -> 0:s:null_minus:null_if_mod:null_mod null_minus :: 0:s:null_minus:null_if_mod:null_mod null_if_mod :: 0:s:null_minus:null_if_mod:null_mod null_le :: true:false:null_le null_mod :: 0:s:null_minus:null_if_mod:null_mod 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: 0 => 0 true => 2 false => 1 null_minus => 0 null_if_mod => 0 null_le => 0 null_mod => 0 ---------------------------------------- (10) Obligation: Complexity RNTS consisting of the following rules: if_mod(z, z', z'') -{ 1 }-> mod(minus(x, y), 1 + y) :|: z = 2, z' = 1 + x, x >= 0, y >= 0, z'' = 1 + y if_mod(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 if_mod(z, z', z'') -{ 1 }-> 1 + x :|: z' = 1 + x, z = 1, x >= 0, y >= 0, z'' = 1 + y 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 mod(z, z') -{ 1 }-> if_mod(le(y, x), 1 + x, 1 + y) :|: z' = 1 + y, x >= 0, y >= 0, z = 1 + x mod(z, z') -{ 1 }-> 0 :|: y >= 0, z = 0, z' = y mod(z, z') -{ 1 }-> 0 :|: x >= 0, z = 1 + x, z' = 0 mod(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 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(V1, V, V14),0,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V14),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V14),0,[mod(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V14),0,[fun(V1, V, V14, Out)],[V1 >= 0,V >= 0,V14 >= 0]). eq(le(V1, V, Out),1,[],[Out = 2,V2 >= 0,V1 = 0,V = V2]). eq(le(V1, V, Out),1,[],[Out = 1,V3 >= 0,V1 = 1 + V3,V = 0]). eq(le(V1, V, Out),1,[le(V4, V5, Ret)],[Out = Ret,V = 1 + V5,V4 >= 0,V5 >= 0,V1 = 1 + V4]). eq(minus(V1, V, Out),1,[],[Out = V6,V6 >= 0,V1 = V6,V = 0]). eq(minus(V1, V, Out),1,[minus(V7, V8, Ret1)],[Out = Ret1,V = 1 + V8,V7 >= 0,V8 >= 0,V1 = 1 + V7]). eq(mod(V1, V, Out),1,[],[Out = 0,V9 >= 0,V1 = 0,V = V9]). eq(mod(V1, V, Out),1,[],[Out = 0,V10 >= 0,V1 = 1 + V10,V = 0]). eq(mod(V1, V, Out),1,[le(V11, V12, Ret0),fun(Ret0, 1 + V12, 1 + V11, Ret2)],[Out = Ret2,V = 1 + V11,V12 >= 0,V11 >= 0,V1 = 1 + V12]). eq(fun(V1, V, V14, Out),1,[minus(V15, V13, Ret01),mod(Ret01, 1 + V13, Ret3)],[Out = Ret3,V1 = 2,V = 1 + V15,V15 >= 0,V13 >= 0,V14 = 1 + V13]). eq(fun(V1, V, V14, Out),1,[],[Out = 1 + V16,V = 1 + V16,V1 = 1,V16 >= 0,V17 >= 0,V14 = 1 + V17]). eq(minus(V1, V, Out),0,[],[Out = 0,V19 >= 0,V18 >= 0,V1 = V19,V = V18]). eq(fun(V1, V, V14, Out),0,[],[Out = 0,V21 >= 0,V14 = V22,V20 >= 0,V1 = V21,V = V20,V22 >= 0]). eq(le(V1, V, Out),0,[],[Out = 0,V24 >= 0,V23 >= 0,V1 = V24,V = V23]). eq(mod(V1, V, Out),0,[],[Out = 0,V25 >= 0,V26 >= 0,V1 = V25,V = V26]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(mod(V1,V,Out),[V1,V],[Out]). input_output_vars(fun(V1,V,V14,Out),[V1,V,V14],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [minus/3] 1. recursive : [le/3] 2. recursive : [fun/4,(mod)/3] 3. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into minus/3 1. SCC is partially evaluated into le/3 2. SCC is partially evaluated into (mod)/3 3. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations minus/3 * CE 9 is refined into CE [20] * CE 7 is refined into CE [21] * CE 8 is refined into CE [22] ### Cost equations --> "Loop" of minus/3 * CEs [22] --> Loop 14 * CEs [20] --> Loop 15 * CEs [21] --> Loop 16 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [14]: [V,V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [14]: - RF of loop [14:1]: V V1 ### Specialization of cost equations le/3 * CE 19 is refined into CE [23] * CE 17 is refined into CE [24] * CE 16 is refined into CE [25] * CE 18 is refined into CE [26] ### Cost equations --> "Loop" of le/3 * CEs [26] --> Loop 17 * CEs [23] --> Loop 18 * CEs [24] --> Loop 19 * CEs [25] --> Loop 20 ### Ranking functions of CR le(V1,V,Out) * RF of phase [17]: [V,V1] #### Partial ranking functions of CR le(V1,V,Out) * Partial RF of phase [17]: - RF of loop [17:1]: V V1 ### Specialization of cost equations (mod)/3 * CE 11 is refined into CE [27,28] * CE 14 is refined into CE [29] * CE 10 is refined into CE [30,31,32,33,34] * CE 13 is refined into CE [35] * CE 15 is refined into CE [36] * CE 12 is refined into CE [37,38,39,40] ### Cost equations --> "Loop" of (mod)/3 * CEs [40] --> Loop 21 * CEs [39] --> Loop 22 * CEs [37] --> Loop 23 * CEs [38] --> Loop 24 * CEs [28] --> Loop 25 * CEs [30] --> Loop 26 * CEs [29] --> Loop 27 * CEs [27] --> Loop 28 * CEs [31] --> Loop 29 * CEs [32,33,34,35,36] --> Loop 30 ### Ranking functions of CR mod(V1,V,Out) * RF of phase [21]: [V1-1,V1-V+1] * RF of phase [23]: [V1] #### Partial ranking functions of CR mod(V1,V,Out) * Partial RF of phase [21]: - RF of loop [21:1]: V1-1 V1-V+1 * Partial RF of phase [23]: - RF of loop [23:1]: V1 ### Specialization of cost equations start/3 * CE 3 is refined into CE [41,42,43,44,45,46,47,48] * CE 1 is refined into CE [49] * CE 2 is refined into CE [50] * CE 4 is refined into CE [51,52,53,54,55] * CE 5 is refined into CE [56,57,58] * CE 6 is refined into CE [59,60,61,62,63,64,65] ### Cost equations --> "Loop" of start/3 * CEs [62] --> Loop 31 * CEs [52,56,61] --> Loop 32 * CEs [45] --> Loop 33 * CEs [41,42,43,44,46,47,48] --> Loop 34 * CEs [60] --> Loop 35 * CEs [50] --> Loop 36 * CEs [49,51,53,54,55,57,58,59,63,64,65] --> Loop 37 ### Ranking functions of CR start(V1,V,V14) #### Partial ranking functions of CR start(V1,V,V14) Computing Bounds ===================================== #### Cost of chains of minus(V1,V,Out): * Chain [[14],16]: 1*it(14)+1 Such that:it(14) =< V with precondition: [V1=Out+V,V>=1,V1>=V] * Chain [[14],15]: 1*it(14)+0 Such that:it(14) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [16]: 1 with precondition: [V=0,V1=Out,V1>=0] * Chain [15]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of le(V1,V,Out): * Chain [[17],20]: 1*it(17)+1 Such that:it(17) =< V1 with precondition: [Out=2,V1>=1,V>=V1] * Chain [[17],19]: 1*it(17)+1 Such that:it(17) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [[17],18]: 1*it(17)+0 Such that:it(17) =< V with precondition: [Out=0,V1>=1,V>=1] * Chain [20]: 1 with precondition: [V1=0,Out=2,V>=0] * Chain [19]: 1 with precondition: [V=0,Out=1,V1>=1] * Chain [18]: 0 with precondition: [Out=0,V1>=0,V>=0] #### Cost of chains of mod(V1,V,Out): * Chain [[23],30]: 6*it(23)+1*s(5)+2 Such that:s(5) =< 1 aux(2) =< V1 it(23) =< aux(2) with precondition: [V=1,Out=0,V1>=1] * Chain [[23],26]: 4*it(23)+2 Such that:it(23) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[23],24,30]: 4*it(23)+1*s(5)+5 Such that:s(5) =< 1 it(23) =< V1 with precondition: [V=1,Out=0,V1>=2] * Chain [[21],30]: 8*it(21)+1*s(5)+2 Such that:s(5) =< V aux(6) =< V1 it(21) =< aux(6) with precondition: [Out=0,V>=2,V1>=V] * Chain [[21],29]: 4*it(21)+2*s(11)+2 Such that:it(21) =< V1-V+1 aux(7) =< V1 it(21) =< aux(7) s(11) =< aux(7) with precondition: [Out=0,V>=2,V1>=V+1] * Chain [[21],28]: 4*it(21)+2*s(11)+3 Such that:it(21) =< V1-V+1 aux(8) =< V1 it(21) =< aux(8) s(11) =< aux(8) with precondition: [Out=1,V>=2,V1>=V+1] * Chain [[21],25]: 4*it(21)+2*s(11)+1*s(13)+3 Such that:aux(4) =< V1 it(21) =< V1-V+1 aux(5) =< V1-Out s(13) =< Out it(21) =< aux(4) s(12) =< aux(4) it(21) =< aux(5) s(12) =< aux(5) s(11) =< s(12) with precondition: [Out>=2,V>=Out+1,V1>=Out+V] * Chain [[21],22,30]: 4*it(21)+3*s(5)+2*s(11)+5 Such that:aux(4) =< V1 aux(10) =< V aux(11) =< V1-V it(21) =< aux(11) s(5) =< aux(10) it(21) =< aux(4) s(12) =< aux(4) s(12) =< aux(11) s(11) =< s(12) with precondition: [Out=0,V>=2,V1>=2*V] * Chain [30]: 2*s(3)+1*s(5)+2 Such that:s(5) =< V aux(1) =< V1 s(3) =< aux(1) with precondition: [Out=0,V1>=0,V>=0] * Chain [29]: 2 with precondition: [V1=1,Out=0,V>=2] * Chain [28]: 3 with precondition: [V1=1,Out=1,V>=2] * Chain [27]: 1 with precondition: [V=0,Out=0,V1>=1] * Chain [26]: 2 with precondition: [V=1,Out=0,V1>=1] * Chain [25]: 1*s(13)+3 Such that:s(13) =< V1 with precondition: [V1=Out,V1>=2,V>=V1+1] * Chain [24,30]: 1*s(5)+5 Such that:s(5) =< 1 with precondition: [V=1,Out=0,V1>=1] * Chain [22,30]: 3*s(5)+5 Such that:aux(10) =< V s(5) =< aux(10) with precondition: [Out=0,V>=2,V1>=V] #### Cost of chains of start(V1,V,V14): * Chain [37]: 12*s(41)+19*s(43)+12*s(47)+4*s(51)+2*s(53)+5 Such that:s(46) =< V1-V aux(17) =< V1 aux(18) =< V1-V+1 aux(19) =< V s(43) =< aux(17) s(47) =< aux(18) s(41) =< aux(19) s(51) =< s(46) s(51) =< aux(17) s(52) =< aux(17) s(52) =< s(46) s(53) =< s(52) s(47) =< aux(17) with precondition: [V1>=0,V>=0] * Chain [36]: 1 with precondition: [V1=1,V>=1,V14>=1] * Chain [35]: 3 with precondition: [V1=1,V>=2] * Chain [34]: 36*s(66)+11*s(69)+21*s(78)+12*s(90)+4*s(94)+2*s(96)+18*s(97)+7 Such that:s(89) =< V-2*V14 aux(24) =< 1 aux(25) =< V aux(26) =< V-2*V14+1 aux(27) =< V-V14 aux(28) =< V14 s(90) =< aux(26) s(97) =< aux(27) s(78) =< aux(28) s(66) =< aux(25) s(69) =< aux(24) s(94) =< s(89) s(94) =< aux(27) s(95) =< aux(27) s(95) =< s(89) s(96) =< s(95) s(90) =< aux(27) with precondition: [V1=2,V>=1,V14>=1] * Chain [33]: 1*s(111)+5 Such that:s(111) =< V14 with precondition: [V1=2,V=V14+1,V>=3] * Chain [32]: 1 with precondition: [V=0,V1>=0] * Chain [31]: 3*s(114)+14*s(115)+5 Such that:s(112) =< 1 s(113) =< V1 s(114) =< s(112) s(115) =< s(113) with precondition: [V=1,V1>=1] Closed-form bounds of start(V1,V,V14): ------------------------------------- * Chain [37] with precondition: [V1>=0,V>=0] - Upper bound: 21*V1+12*V+5+nat(V1-V+1)*12+nat(V1-V)*4 - Complexity: n * Chain [36] with precondition: [V1=1,V>=1,V14>=1] - Upper bound: 1 - Complexity: constant * Chain [35] with precondition: [V1=1,V>=2] - Upper bound: 3 - Complexity: constant * Chain [34] with precondition: [V1=2,V>=1,V14>=1] - Upper bound: 36*V+21*V14+18+nat(V-2*V14+1)*12+nat(V-V14)*20+nat(V-2*V14)*4 - Complexity: n * Chain [33] with precondition: [V1=2,V=V14+1,V>=3] - Upper bound: V14+5 - Complexity: n * Chain [32] with precondition: [V=0,V1>=0] - Upper bound: 1 - Complexity: constant * Chain [31] with precondition: [V=1,V1>=1] - Upper bound: 14*V1+8 - Complexity: n ### Maximum cost of start(V1,V,V14): max([14*V1+2+max([3,7*V1+12*V+nat(V1-V+1)*12+nat(V1-V)*4]),36*V+13+nat(V14)*20+nat(V-2*V14+1)*12+nat(V-V14)*20+nat(V-2*V14)*4+(nat(V14)+2)])+3 Asymptotic class: n * Total analysis performed in 408 ms. ---------------------------------------- (12) BOUNDS(1, n^1) ---------------------------------------- (13) RenamingProof (BOTH BOUNDS(ID, ID)) Renamed function symbols to avoid clashes with predefined symbol. ---------------------------------------- (14) Obligation: The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(n^1, INF). The TRS R consists of the following rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(0', y) -> 0' mod(s(x), 0') -> 0' mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) S is empty. Rewrite Strategy: FULL ---------------------------------------- (15) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Infered types. ---------------------------------------- (16) Obligation: TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(0', y) -> 0' mod(s(x), 0') -> 0' mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s ---------------------------------------- (17) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: le, minus, mod They will be analysed ascendingly in the following order: le < mod minus < mod ---------------------------------------- (18) Obligation: TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(0', y) -> 0' mod(s(x), 0') -> 0' mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, minus, mod They will be analysed ascendingly in the following order: le < mod minus < mod ---------------------------------------- (19) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Induction Base: le(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) true Induction Step: le(gen_0':s3_0(+(n5_0, 1)), gen_0':s3_0(+(n5_0, 1))) ->_R^Omega(1) le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) ->_IH true We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (20) Complex Obligation (BEST) ---------------------------------------- (21) Obligation: Proved the lower bound n^1 for the following obligation: TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(0', y) -> 0' mod(s(x), 0') -> 0' mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: le, minus, mod They will be analysed ascendingly in the following order: le < mod minus < mod ---------------------------------------- (22) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (23) BOUNDS(n^1, INF) ---------------------------------------- (24) Obligation: TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(0', y) -> 0' mod(s(x), 0') -> 0' mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: minus, mod They will be analysed ascendingly in the following order: minus < mod ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: minus(gen_0':s3_0(n252_0), gen_0':s3_0(n252_0)) -> gen_0':s3_0(0), rt in Omega(1 + n252_0) Induction Base: minus(gen_0':s3_0(0), gen_0':s3_0(0)) ->_R^Omega(1) gen_0':s3_0(0) Induction Step: minus(gen_0':s3_0(+(n252_0, 1)), gen_0':s3_0(+(n252_0, 1))) ->_R^Omega(1) minus(gen_0':s3_0(n252_0), gen_0':s3_0(n252_0)) ->_IH gen_0':s3_0(0) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Obligation: TRS: Rules: le(0', y) -> true le(s(x), 0') -> false le(s(x), s(y)) -> le(x, y) minus(x, 0') -> x minus(s(x), s(y)) -> minus(x, y) mod(0', y) -> 0' mod(s(x), 0') -> 0' mod(s(x), s(y)) -> if_mod(le(y, x), s(x), s(y)) if_mod(true, s(x), s(y)) -> mod(minus(x, y), s(y)) if_mod(false, s(x), s(y)) -> s(x) Types: le :: 0':s -> 0':s -> true:false 0' :: 0':s true :: true:false s :: 0':s -> 0':s false :: true:false minus :: 0':s -> 0':s -> 0':s mod :: 0':s -> 0':s -> 0':s if_mod :: true:false -> 0':s -> 0':s -> 0':s hole_true:false1_0 :: true:false hole_0':s2_0 :: 0':s gen_0':s3_0 :: Nat -> 0':s Lemmas: le(gen_0':s3_0(n5_0), gen_0':s3_0(n5_0)) -> true, rt in Omega(1 + n5_0) minus(gen_0':s3_0(n252_0), gen_0':s3_0(n252_0)) -> gen_0':s3_0(0), rt in Omega(1 + n252_0) Generator Equations: gen_0':s3_0(0) <=> 0' gen_0':s3_0(+(x, 1)) <=> s(gen_0':s3_0(x)) The following defined symbols remain to be analysed: mod