WORST_CASE(Omega(n^1),O(n^2)) proof of input_qu8uXbwMHo.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^2). (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, 481 ms] (10) BOUNDS(1, n^2) (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), 9 ms] (20) typed CpxTrs (21) RewriteLemmaProof [LOWER BOUND(ID), 301 ms] (22) typed CpxTrs (23) RewriteLemmaProof [LOWER BOUND(ID), 130 ms] (24) typed CpxTrs (25) RewriteLemmaProof [LOWER BOUND(ID), 143 ms] (26) BEST (27) proven lower bound (28) LowerBoundPropagationProof [FINISHED, 0 ms] (29) BOUNDS(n^1, INF) (30) typed CpxTrs (31) RewriteLemmaProof [LOWER BOUND(ID), 75 ms] (32) typed CpxTrs ---------------------------------------- (0) Obligation: The Runtime Complexity (parallel-innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^2). The TRS R consists of the following rules: f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) trunc(0) -> 0 trunc(s(0)) -> 0 trunc(s(s(x))) -> s(s(trunc(x))) gt(0, v) -> false gt(s(u), 0) -> true gt(s(u), s(v)) -> gt(u, v) 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^2). The TRS R consists of the following rules: f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) [1] trunc(0) -> 0 [1] trunc(s(0)) -> 0 [1] trunc(s(s(x))) -> s(s(trunc(x))) [1] gt(0, v) -> false [1] gt(s(u), 0) -> true [1] gt(s(u), s(v)) -> gt(u, v) [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: f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) [1] trunc(0) -> 0 [1] trunc(s(0)) -> 0 [1] trunc(s(s(x))) -> s(s(trunc(x))) [1] gt(0, v) -> false [1] gt(s(u), 0) -> true [1] gt(s(u), s(v)) -> gt(u, v) [1] The TRS has the following type information: f :: true:false -> s:0 -> s:0 -> f true :: true:false gt :: s:0 -> s:0 -> true:false trunc :: s:0 -> s:0 s :: s:0 -> s:0 0 :: s:0 false :: true:false 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: f(v0, v1, v2) -> null_f [0] And the following fresh constants: null_f ---------------------------------------- (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: f(true, x, y) -> f(gt(x, y), trunc(x), s(y)) [1] trunc(0) -> 0 [1] trunc(s(0)) -> 0 [1] trunc(s(s(x))) -> s(s(trunc(x))) [1] gt(0, v) -> false [1] gt(s(u), 0) -> true [1] gt(s(u), s(v)) -> gt(u, v) [1] f(v0, v1, v2) -> null_f [0] The TRS has the following type information: f :: true:false -> s:0 -> s:0 -> null_f true :: true:false gt :: s:0 -> s:0 -> true:false trunc :: s:0 -> s:0 s :: s:0 -> s:0 0 :: s:0 false :: true:false null_f :: null_f Rewrite Strategy: INNERMOST ---------------------------------------- (7) CpxTypedWeightedTrsToRntsProof (UPPER BOUND(ID)) Transformed the TRS into an over-approximating RNTS by (improved) Size Abstraction. The constant constructors are abstracted as follows: true => 1 0 => 0 false => 0 null_f => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: f(z, z', z'') -{ 1 }-> f(gt(x, y), trunc(x), 1 + y) :|: z' = x, z'' = y, z = 1, x >= 0, y >= 0 f(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 gt(z, z') -{ 1 }-> gt(u, v) :|: v >= 0, z' = 1 + v, z = 1 + u, u >= 0 gt(z, z') -{ 1 }-> 1 :|: z = 1 + u, z' = 0, u >= 0 gt(z, z') -{ 1 }-> 0 :|: v >= 0, z' = v, z = 0 trunc(z) -{ 1 }-> 0 :|: z = 0 trunc(z) -{ 1 }-> 0 :|: z = 1 + 0 trunc(z) -{ 1 }-> 1 + (1 + trunc(x)) :|: x >= 0, z = 1 + (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, V2),0,[f(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[trunc(V1, Out)],[V1 >= 0]). eq(start(V1, V, V2),0,[gt(V1, V, Out)],[V1 >= 0,V >= 0]). eq(f(V1, V, V2, Out),1,[gt(V4, V3, Ret0),trunc(V4, Ret1),f(Ret0, Ret1, 1 + V3, Ret)],[Out = Ret,V = V4,V2 = V3,V1 = 1,V4 >= 0,V3 >= 0]). eq(trunc(V1, Out),1,[],[Out = 0,V1 = 0]). eq(trunc(V1, Out),1,[],[Out = 0,V1 = 1]). eq(trunc(V1, Out),1,[trunc(V5, Ret11)],[Out = 2 + Ret11,V5 >= 0,V1 = 2 + V5]). eq(gt(V1, V, Out),1,[],[Out = 0,V6 >= 0,V = V6,V1 = 0]). eq(gt(V1, V, Out),1,[],[Out = 1,V1 = 1 + V7,V = 0,V7 >= 0]). eq(gt(V1, V, Out),1,[gt(V8, V9, Ret2)],[Out = Ret2,V9 >= 0,V = 1 + V9,V1 = 1 + V8,V8 >= 0]). eq(f(V1, V, V2, Out),0,[],[Out = 0,V11 >= 0,V2 = V12,V10 >= 0,V1 = V11,V = V10,V12 >= 0]). input_output_vars(f(V1,V,V2,Out),[V1,V,V2],[Out]). input_output_vars(trunc(V1,Out),[V1],[Out]). input_output_vars(gt(V1,V,Out),[V1,V],[Out]). CoFloCo proof output: Preprocessing Cost Relations ===================================== #### Computed strongly connected components 0. recursive : [gt/3] 1. recursive : [trunc/2] 2. recursive : [f/4] 3. non_recursive : [start/3] #### Obtained direct recursion through partial evaluation 0. SCC is partially evaluated into gt/3 1. SCC is partially evaluated into trunc/2 2. SCC is partially evaluated into f/4 3. SCC is partially evaluated into start/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations gt/3 * CE 11 is refined into CE [12] * CE 10 is refined into CE [13] * CE 9 is refined into CE [14] ### Cost equations --> "Loop" of gt/3 * CEs [13] --> Loop 10 * CEs [14] --> Loop 11 * CEs [12] --> Loop 12 ### Ranking functions of CR gt(V1,V,Out) * RF of phase [12]: [V,V1] #### Partial ranking functions of CR gt(V1,V,Out) * Partial RF of phase [12]: - RF of loop [12:1]: V V1 ### Specialization of cost equations trunc/2 * CE 8 is refined into CE [15] * CE 7 is refined into CE [16] * CE 6 is refined into CE [17] ### Cost equations --> "Loop" of trunc/2 * CEs [16] --> Loop 13 * CEs [17] --> Loop 14 * CEs [15] --> Loop 15 ### Ranking functions of CR trunc(V1,Out) * RF of phase [15]: [V1-1] #### Partial ranking functions of CR trunc(V1,Out) * Partial RF of phase [15]: - RF of loop [15:1]: V1-1 ### Specialization of cost equations f/4 * CE 5 is refined into CE [18] * CE 4 is refined into CE [19,20,21,22,23,24,25,26,27] ### Cost equations --> "Loop" of f/4 * CEs [26] --> Loop 16 * CEs [27] --> Loop 17 * CEs [25] --> Loop 18 * CEs [24] --> Loop 19 * CEs [22] --> Loop 20 * CEs [21] --> Loop 21 * CEs [23] --> Loop 22 * CEs [20] --> Loop 23 * CEs [19] --> Loop 24 * CEs [18] --> Loop 25 ### Ranking functions of CR f(V1,V,V2,Out) * RF of phase [16,17]: [V-V2] #### Partial ranking functions of CR f(V1,V,V2,Out) * Partial RF of phase [16,17]: - RF of loop [16:1]: V-V2 - RF of loop [17:1]: V-2 V/2-V2/2 ### Specialization of cost equations start/3 * CE 1 is refined into CE [28,29,30,31,32,33] * CE 2 is refined into CE [34,35,36,37] * CE 3 is refined into CE [38,39,40,41] ### Cost equations --> "Loop" of start/3 * CEs [36,37,41] --> Loop 26 * CEs [40] --> Loop 27 * CEs [28] --> Loop 28 * CEs [39] --> Loop 29 * CEs [29,30,31,32,33,35] --> Loop 30 * CEs [34,38] --> Loop 31 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) Computing Bounds ===================================== #### Cost of chains of gt(V1,V,Out): * Chain [[12],11]: 1*it(12)+1 Such that:it(12) =< V1 with precondition: [Out=0,V1>=1,V>=V1] * Chain [[12],10]: 1*it(12)+1 Such that:it(12) =< V with precondition: [Out=1,V>=1,V1>=V+1] * Chain [11]: 1 with precondition: [V1=0,Out=0,V>=0] * Chain [10]: 1 with precondition: [V=0,Out=1,V1>=1] #### Cost of chains of trunc(V1,Out): * Chain [[15],14]: 1*it(15)+1 Such that:it(15) =< Out with precondition: [V1=Out,V1>=2] * Chain [[15],13]: 1*it(15)+1 Such that:it(15) =< Out with precondition: [V1=Out+1,V1>=3] * Chain [14]: 1 with precondition: [V1=0,Out=0] * Chain [13]: 1 with precondition: [V1=1,Out=0] #### Cost of chains of f(V1,V,V2,Out): * Chain [[16,17],25]: 3*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+0 Such that:aux(5) =< V aux(6) =< V-V2 aux(7) =< V-V2+1 it(17) =< V/2-V2/2 it(17) =< aux(5) it(16) =< aux(6) it(17) =< aux(6) it(16) =< aux(7) it(17) =< aux(7) aux(4) =< aux(5) aux(3) =< aux(5)-1 s(9) =< it(16)*aux(5) s(11) =< it(17)*aux(4) s(12) =< it(17)*aux(3) with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] * Chain [[16,17],19,25]: 3*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+2*s(13)+3 Such that:aux(6) =< V-V2 aux(9) =< V aux(10) =< 2*V-V2 it(17) =< aux(9) s(13) =< aux(10) it(16) =< aux(6) it(17) =< aux(6) it(16) =< aux(10) it(17) =< aux(10) aux(4) =< aux(9) aux(3) =< aux(9)-1 s(9) =< it(16)*aux(9) s(11) =< it(17)*aux(4) s(12) =< it(17)*aux(3) with precondition: [V1=1,Out=0,V2>=1,V>=V2+1] * Chain [[16,17],18,25]: 3*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+2*s(15)+3 Such that:aux(6) =< V-V2 aux(12) =< V aux(13) =< 2*V-V2 it(17) =< aux(12) s(15) =< aux(13) it(16) =< aux(6) it(17) =< aux(6) it(16) =< aux(13) it(17) =< aux(13) aux(4) =< aux(12) aux(3) =< aux(12)-1 s(9) =< it(16)*aux(12) s(11) =< it(17)*aux(4) s(12) =< it(17)*aux(3) with precondition: [V1=1,Out=0,V>=3,V2>=1,V>=V2+1] * Chain [25]: 0 with precondition: [Out=0,V1>=0,V>=0,V2>=0] * Chain [24,25]: 3 with precondition: [V1=1,V=0,Out=0,V2>=0] * Chain [23,25]: 3 with precondition: [V1=1,V=1,V2=0,Out=0] * Chain [23,24,25]: 6 with precondition: [V1=1,V=1,V2=0,Out=0] * Chain [22,25]: 1*s(17)+3 Such that:s(17) =< 1 with precondition: [V1=1,V=1,Out=0,V2>=1] * Chain [21,[16,17],25]: 4*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+3 Such that:it(17) =< V/2 aux(14) =< V it(16) =< aux(14) it(17) =< aux(14) aux(4) =< aux(14) aux(3) =< aux(14)-1 s(9) =< it(16)*aux(14) s(11) =< it(17)*aux(4) s(12) =< it(17)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=2] * Chain [21,[16,17],19,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(13)+1*s(18)+6 Such that:aux(10) =< 2*V aux(15) =< V s(18) =< aux(15) it(16) =< aux(15) s(13) =< aux(10) it(16) =< aux(10) aux(4) =< aux(15) aux(3) =< aux(15)-1 s(9) =< it(16)*aux(15) s(11) =< it(16)*aux(4) s(12) =< it(16)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=2] * Chain [21,[16,17],18,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(15)+1*s(18)+6 Such that:aux(13) =< 2*V aux(16) =< V s(18) =< aux(16) it(16) =< aux(16) s(15) =< aux(13) it(16) =< aux(13) aux(4) =< aux(16) aux(3) =< aux(16)-1 s(9) =< it(16)*aux(16) s(11) =< it(16)*aux(4) s(12) =< it(16)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=3] * Chain [21,25]: 1*s(18)+3 Such that:s(18) =< V with precondition: [V1=1,V2=0,Out=0,V>=2] * Chain [20,[16,17],25]: 4*it(16)+3*it(17)+2*s(9)+1*s(11)+1*s(12)+3 Such that:it(17) =< V/2 aux(17) =< V it(16) =< aux(17) it(17) =< aux(17) aux(4) =< aux(17) aux(3) =< aux(17)-1 s(9) =< it(16)*aux(17) s(11) =< it(17)*aux(4) s(12) =< it(17)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=3] * Chain [20,[16,17],19,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(13)+1*s(19)+6 Such that:aux(10) =< 2*V aux(18) =< V s(19) =< aux(18) it(16) =< aux(18) s(13) =< aux(10) it(16) =< aux(10) aux(4) =< aux(18) aux(3) =< aux(18)-1 s(9) =< it(16)*aux(18) s(11) =< it(16)*aux(4) s(12) =< it(16)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=3] * Chain [20,[16,17],18,25]: 6*it(16)+2*s(9)+1*s(11)+1*s(12)+2*s(15)+1*s(19)+6 Such that:aux(13) =< 2*V aux(19) =< V s(19) =< aux(19) it(16) =< aux(19) s(15) =< aux(13) it(16) =< aux(13) aux(4) =< aux(19) aux(3) =< aux(19)-1 s(9) =< it(16)*aux(19) s(11) =< it(16)*aux(4) s(12) =< it(16)*aux(3) with precondition: [V1=1,V2=0,Out=0,V>=4] * Chain [20,25]: 1*s(19)+3 Such that:s(19) =< V with precondition: [V1=1,V2=0,Out=0,V>=3] * Chain [19,25]: 2*s(13)+3 Such that:aux(8) =< V s(13) =< aux(8) with precondition: [V1=1,Out=0,V>=2,V2>=V] * Chain [18,25]: 2*s(15)+3 Such that:aux(11) =< V s(15) =< aux(11) with precondition: [V1=1,Out=0,V>=3,V2>=V] #### Cost of chains of start(V1,V,V2): * Chain [31]: 1 with precondition: [V1=0] * Chain [30]: 1*s(114)+18*s(118)+6*s(119)+24*s(120)+8*s(121)+8*s(124)+4*s(125)+4*s(126)+4*s(127)+2*s(128)+2*s(129)+3*s(133)+3*s(137)+2*s(140)+1*s(141)+1*s(142)+6*s(143)+4*s(144)+6*s(145)+4*s(146)+2*s(147)+2*s(148)+6 Such that:s(114) =< 1 s(135) =< V-V2 s(132) =< V-V2+1 s(116) =< 2*V s(136) =< 2*V-V2 s(117) =< V/2 s(133) =< V/2-V2/2 aux(27) =< V s(118) =< aux(27) s(119) =< s(117) s(120) =< aux(27) s(121) =< s(116) s(120) =< s(116) s(122) =< aux(27) s(123) =< aux(27)-1 s(124) =< s(120)*aux(27) s(125) =< s(120)*s(122) s(126) =< s(120)*s(123) s(119) =< aux(27) s(127) =< s(118)*aux(27) s(128) =< s(119)*s(122) s(129) =< s(119)*s(123) s(133) =< aux(27) s(137) =< s(135) s(133) =< s(135) s(137) =< s(132) s(133) =< s(132) s(140) =< s(137)*aux(27) s(141) =< s(133)*s(122) s(142) =< s(133)*s(123) s(143) =< aux(27) s(144) =< s(136) s(145) =< s(135) s(143) =< s(135) s(145) =< s(136) s(143) =< s(136) s(146) =< s(145)*aux(27) s(147) =< s(143)*s(122) s(148) =< s(143)*s(123) with precondition: [V1=1] * Chain [29]: 1 with precondition: [V=0,V1>=1] * Chain [28]: 3 with precondition: [V1>=0,V>=0,V2>=0] * Chain [27]: 1*s(149)+1 Such that:s(149) =< V1 with precondition: [V1>=1,V>=V1] * Chain [26]: 2*s(150)+1*s(152)+1 Such that:s(152) =< V aux(28) =< V1 s(150) =< aux(28) with precondition: [V1>=2] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [31] with precondition: [V1=0] - Upper bound: 1 - Complexity: constant * Chain [30] with precondition: [V1=1] - Upper bound: nat(V)*48+7+nat(V)*18*nat(V)+nat(V)*6*nat(nat(V)+ -1)+nat(V)*6*nat(V-V2)+nat(V/2-V2/2)*nat(V)+nat(V)*2*nat(V/2)+nat(V/2-V2/2)*nat(nat(V)+ -1)+nat(nat(V)+ -1)*2*nat(V/2)+nat(2*V)*8+nat(V-V2)*9+nat(2*V-V2)*4+nat(V/2-V2/2)*3+nat(V/2)*6 - Complexity: n^2 * Chain [29] with precondition: [V=0,V1>=1] - Upper bound: 1 - Complexity: constant * Chain [28] with precondition: [V1>=0,V>=0,V2>=0] - Upper bound: 3 - Complexity: constant * Chain [27] with precondition: [V1>=1,V>=V1] - Upper bound: V1+1 - Complexity: n * Chain [26] with precondition: [V1>=2] - Upper bound: 2*V1+1+nat(V) - Complexity: n ### Maximum cost of start(V1,V,V2): max([max([2,nat(V)*48+6+nat(V)*18*nat(V)+nat(V)*6*nat(nat(V)+ -1)+nat(V)*6*nat(V-V2)+nat(V/2-V2/2)*nat(V)+nat(V)*2*nat(V/2)+nat(V/2-V2/2)*nat(nat(V)+ -1)+nat(nat(V)+ -1)*2*nat(V/2)+nat(2*V)*8+nat(V-V2)*9+nat(2*V-V2)*4+nat(V/2-V2/2)*3+nat(V/2)*6]),nat(V)+V1+V1])+1 Asymptotic class: n^2 * Total analysis performed in 487 ms. ---------------------------------------- (10) BOUNDS(1, n^2) ---------------------------------------- (11) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID)) Converted Cpx (relative) TRS with rewrite strategy PARALLEL_INNERMOST to CDT ---------------------------------------- (12) Obligation: Complexity Dependency Tuples Problem Rules: f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0) -> 0 trunc(s(0)) -> 0 trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0, z0) -> false gt(s(z0), 0) -> true gt(s(z0), s(z1)) -> gt(z0, z1) Tuples: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0) -> c2 TRUNC(s(0)) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0, z0) -> c5 GT(s(z0), 0) -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) S tuples: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0) -> c2 TRUNC(s(0)) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0, z0) -> c5 GT(s(z0), 0) -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) K tuples:none Defined Rule Symbols: f_3, trunc_1, gt_2 Defined Pair Symbols: F_3, TRUNC_1, GT_2 Compound Symbols: c_2, c1_2, c2, c3, c4_1, c5, c6, c7_1 ---------------------------------------- (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: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0) -> c2 TRUNC(s(0)) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0, z0) -> c5 GT(s(z0), 0) -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) The (relative) TRS S consists of the following rules: f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0) -> 0 trunc(s(0)) -> 0 trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0, z0) -> false gt(s(z0), 0) -> true gt(s(z0), s(z1)) -> gt(z0, 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: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) The (relative) TRS S consists of the following rules: f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Rewrite Strategy: INNERMOST ---------------------------------------- (17) TypeInferenceProof (BOTH BOUNDS(ID, ID)) Inferred types. ---------------------------------------- (18) Obligation: Innermost TRS: Rules: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 ---------------------------------------- (19) OrderProof (LOWER BOUND(ID)) Heuristically decided to analyse the following defined symbols: F, gt, trunc, GT, TRUNC, f They will be analysed ascendingly in the following order: gt < F trunc < F GT < F TRUNC < F gt < f trunc < f ---------------------------------------- (20) Obligation: Innermost TRS: Rules: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 Generator Equations: gen_c:c17_8(0) <=> hole_c:c11_8 gen_c:c17_8(+(x, 1)) <=> c(gen_c:c17_8(x), c5) gen_s:0'8_8(0) <=> 0' gen_s:0'8_8(+(x, 1)) <=> s(gen_s:0'8_8(x)) gen_c5:c6:c79_8(0) <=> c5 gen_c5:c6:c79_8(+(x, 1)) <=> c7(gen_c5:c6:c79_8(x)) gen_c2:c3:c410_8(0) <=> c2 gen_c2:c3:c410_8(+(x, 1)) <=> c4(gen_c2:c3:c410_8(x)) The following defined symbols remain to be analysed: gt, F, trunc, GT, TRUNC, f They will be analysed ascendingly in the following order: gt < F trunc < F GT < F TRUNC < F gt < f trunc < f ---------------------------------------- (21) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) -> false, rt in Omega(0) Induction Base: gt(gen_s:0'8_8(0), gen_s:0'8_8(0)) ->_R^Omega(0) false Induction Step: gt(gen_s:0'8_8(+(n12_8, 1)), gen_s:0'8_8(+(n12_8, 1))) ->_R^Omega(0) gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) ->_IH false 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: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 Lemmas: gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) -> false, rt in Omega(0) Generator Equations: gen_c:c17_8(0) <=> hole_c:c11_8 gen_c:c17_8(+(x, 1)) <=> c(gen_c:c17_8(x), c5) gen_s:0'8_8(0) <=> 0' gen_s:0'8_8(+(x, 1)) <=> s(gen_s:0'8_8(x)) gen_c5:c6:c79_8(0) <=> c5 gen_c5:c6:c79_8(+(x, 1)) <=> c7(gen_c5:c6:c79_8(x)) gen_c2:c3:c410_8(0) <=> c2 gen_c2:c3:c410_8(+(x, 1)) <=> c4(gen_c2:c3:c410_8(x)) The following defined symbols remain to be analysed: trunc, F, GT, TRUNC, f They will be analysed ascendingly in the following order: trunc < F GT < F TRUNC < F trunc < f ---------------------------------------- (23) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: trunc(gen_s:0'8_8(*(2, n319_8))) -> gen_s:0'8_8(*(2, n319_8)), rt in Omega(0) Induction Base: trunc(gen_s:0'8_8(*(2, 0))) ->_R^Omega(0) 0' Induction Step: trunc(gen_s:0'8_8(*(2, +(n319_8, 1)))) ->_R^Omega(0) s(s(trunc(gen_s:0'8_8(*(2, n319_8))))) ->_IH s(s(gen_s:0'8_8(*(2, c320_8)))) We have rt in Omega(1) and sz in O(n). Thus, we have irc_R in Omega(n^0). ---------------------------------------- (24) Obligation: Innermost TRS: Rules: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 Lemmas: gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) -> false, rt in Omega(0) trunc(gen_s:0'8_8(*(2, n319_8))) -> gen_s:0'8_8(*(2, n319_8)), rt in Omega(0) Generator Equations: gen_c:c17_8(0) <=> hole_c:c11_8 gen_c:c17_8(+(x, 1)) <=> c(gen_c:c17_8(x), c5) gen_s:0'8_8(0) <=> 0' gen_s:0'8_8(+(x, 1)) <=> s(gen_s:0'8_8(x)) gen_c5:c6:c79_8(0) <=> c5 gen_c5:c6:c79_8(+(x, 1)) <=> c7(gen_c5:c6:c79_8(x)) gen_c2:c3:c410_8(0) <=> c2 gen_c2:c3:c410_8(+(x, 1)) <=> c4(gen_c2:c3:c410_8(x)) The following defined symbols remain to be analysed: GT, F, TRUNC, f They will be analysed ascendingly in the following order: GT < F TRUNC < F ---------------------------------------- (25) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: GT(gen_s:0'8_8(n810_8), gen_s:0'8_8(n810_8)) -> gen_c5:c6:c79_8(n810_8), rt in Omega(1 + n810_8) Induction Base: GT(gen_s:0'8_8(0), gen_s:0'8_8(0)) ->_R^Omega(1) c5 Induction Step: GT(gen_s:0'8_8(+(n810_8, 1)), gen_s:0'8_8(+(n810_8, 1))) ->_R^Omega(1) c7(GT(gen_s:0'8_8(n810_8), gen_s:0'8_8(n810_8))) ->_IH c7(gen_c5:c6:c79_8(c811_8)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (26) Complex Obligation (BEST) ---------------------------------------- (27) Obligation: Proved the lower bound n^1 for the following obligation: Innermost TRS: Rules: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 Lemmas: gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) -> false, rt in Omega(0) trunc(gen_s:0'8_8(*(2, n319_8))) -> gen_s:0'8_8(*(2, n319_8)), rt in Omega(0) Generator Equations: gen_c:c17_8(0) <=> hole_c:c11_8 gen_c:c17_8(+(x, 1)) <=> c(gen_c:c17_8(x), c5) gen_s:0'8_8(0) <=> 0' gen_s:0'8_8(+(x, 1)) <=> s(gen_s:0'8_8(x)) gen_c5:c6:c79_8(0) <=> c5 gen_c5:c6:c79_8(+(x, 1)) <=> c7(gen_c5:c6:c79_8(x)) gen_c2:c3:c410_8(0) <=> c2 gen_c2:c3:c410_8(+(x, 1)) <=> c4(gen_c2:c3:c410_8(x)) The following defined symbols remain to be analysed: GT, F, TRUNC, f They will be analysed ascendingly in the following order: GT < F TRUNC < F ---------------------------------------- (28) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (29) BOUNDS(n^1, INF) ---------------------------------------- (30) Obligation: Innermost TRS: Rules: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 Lemmas: gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) -> false, rt in Omega(0) trunc(gen_s:0'8_8(*(2, n319_8))) -> gen_s:0'8_8(*(2, n319_8)), rt in Omega(0) GT(gen_s:0'8_8(n810_8), gen_s:0'8_8(n810_8)) -> gen_c5:c6:c79_8(n810_8), rt in Omega(1 + n810_8) Generator Equations: gen_c:c17_8(0) <=> hole_c:c11_8 gen_c:c17_8(+(x, 1)) <=> c(gen_c:c17_8(x), c5) gen_s:0'8_8(0) <=> 0' gen_s:0'8_8(+(x, 1)) <=> s(gen_s:0'8_8(x)) gen_c5:c6:c79_8(0) <=> c5 gen_c5:c6:c79_8(+(x, 1)) <=> c7(gen_c5:c6:c79_8(x)) gen_c2:c3:c410_8(0) <=> c2 gen_c2:c3:c410_8(+(x, 1)) <=> c4(gen_c2:c3:c410_8(x)) The following defined symbols remain to be analysed: TRUNC, F, f They will be analysed ascendingly in the following order: TRUNC < F ---------------------------------------- (31) RewriteLemmaProof (LOWER BOUND(ID)) Proved the following rewrite lemma: TRUNC(gen_s:0'8_8(*(2, n1421_8))) -> gen_c2:c3:c410_8(n1421_8), rt in Omega(1 + n1421_8) Induction Base: TRUNC(gen_s:0'8_8(*(2, 0))) ->_R^Omega(1) c2 Induction Step: TRUNC(gen_s:0'8_8(*(2, +(n1421_8, 1)))) ->_R^Omega(1) c4(TRUNC(gen_s:0'8_8(*(2, n1421_8)))) ->_IH c4(gen_c2:c3:c410_8(c1422_8)) We have rt in Omega(n^1) and sz in O(n). Thus, we have irc_R in Omega(n). ---------------------------------------- (32) Obligation: Innermost TRS: Rules: F(true, z0, z1) -> c(F(gt(z0, z1), trunc(z0), s(z1)), GT(z0, z1)) F(true, z0, z1) -> c1(F(gt(z0, z1), trunc(z0), s(z1)), TRUNC(z0)) TRUNC(0') -> c2 TRUNC(s(0')) -> c3 TRUNC(s(s(z0))) -> c4(TRUNC(z0)) GT(0', z0) -> c5 GT(s(z0), 0') -> c6 GT(s(z0), s(z1)) -> c7(GT(z0, z1)) f(true, z0, z1) -> f(gt(z0, z1), trunc(z0), s(z1)) trunc(0') -> 0' trunc(s(0')) -> 0' trunc(s(s(z0))) -> s(s(trunc(z0))) gt(0', z0) -> false gt(s(z0), 0') -> true gt(s(z0), s(z1)) -> gt(z0, z1) Types: F :: true:false -> s:0' -> s:0' -> c:c1 true :: true:false c :: c:c1 -> c5:c6:c7 -> c:c1 gt :: s:0' -> s:0' -> true:false trunc :: s:0' -> s:0' s :: s:0' -> s:0' GT :: s:0' -> s:0' -> c5:c6:c7 c1 :: c:c1 -> c2:c3:c4 -> c:c1 TRUNC :: s:0' -> c2:c3:c4 0' :: s:0' c2 :: c2:c3:c4 c3 :: c2:c3:c4 c4 :: c2:c3:c4 -> c2:c3:c4 c5 :: c5:c6:c7 c6 :: c5:c6:c7 c7 :: c5:c6:c7 -> c5:c6:c7 f :: true:false -> s:0' -> s:0' -> f false :: true:false hole_c:c11_8 :: c:c1 hole_true:false2_8 :: true:false hole_s:0'3_8 :: s:0' hole_c5:c6:c74_8 :: c5:c6:c7 hole_c2:c3:c45_8 :: c2:c3:c4 hole_f6_8 :: f gen_c:c17_8 :: Nat -> c:c1 gen_s:0'8_8 :: Nat -> s:0' gen_c5:c6:c79_8 :: Nat -> c5:c6:c7 gen_c2:c3:c410_8 :: Nat -> c2:c3:c4 Lemmas: gt(gen_s:0'8_8(n12_8), gen_s:0'8_8(n12_8)) -> false, rt in Omega(0) trunc(gen_s:0'8_8(*(2, n319_8))) -> gen_s:0'8_8(*(2, n319_8)), rt in Omega(0) GT(gen_s:0'8_8(n810_8), gen_s:0'8_8(n810_8)) -> gen_c5:c6:c79_8(n810_8), rt in Omega(1 + n810_8) TRUNC(gen_s:0'8_8(*(2, n1421_8))) -> gen_c2:c3:c410_8(n1421_8), rt in Omega(1 + n1421_8) Generator Equations: gen_c:c17_8(0) <=> hole_c:c11_8 gen_c:c17_8(+(x, 1)) <=> c(gen_c:c17_8(x), c5) gen_s:0'8_8(0) <=> 0' gen_s:0'8_8(+(x, 1)) <=> s(gen_s:0'8_8(x)) gen_c5:c6:c79_8(0) <=> c5 gen_c5:c6:c79_8(+(x, 1)) <=> c7(gen_c5:c6:c79_8(x)) gen_c2:c3:c410_8(0) <=> c2 gen_c2:c3:c410_8(+(x, 1)) <=> c4(gen_c2:c3:c410_8(x)) The following defined symbols remain to be analysed: F, f