/export/starexec/sandbox2/solver/bin/starexec_run_complexity /export/starexec/sandbox2/benchmark/theBenchmark.xml /export/starexec/sandbox2/output/output_files -------------------------------------------------------------------------------- WORST_CASE(Omega(n^1), O(n^3)) proof of /export/starexec/sandbox2/benchmark/theBenchmark.xml # AProVE Commit ID: 794c25de1cacf0d048858bcd21c9a779e1221865 marcel 20200619 unpublished dirty The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). (0) CpxTRS (1) RelTrsToWeightedTrsProof [BOTH BOUNDS(ID, 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), 3 ms] (8) CpxRNTS (9) CompleteCoflocoProof [FINISHED, 482 ms] (10) BOUNDS(1, n^3) (11) RelTrsToDecreasingLoopProblemProof [LOWER BOUND(ID), 0 ms] (12) TRS for Loop Detection (13) DecreasingLoopProof [LOWER BOUND(ID), 0 ms] (14) BEST (15) proven lower bound (16) LowerBoundPropagationProof [FINISHED, 0 ms] (17) BOUNDS(n^1, INF) (18) TRS for Loop Detection ---------------------------------------- (0) Obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 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(0, Y) -> 0 minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) ifMinus(true, s(X), Y) -> 0 ifMinus(false, s(X), Y) -> s(minus(X, Y)) quot(0, s(Y)) -> 0 quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (1) RelTrsToWeightedTrsProof (BOTH BOUNDS(ID, 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^3). 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(0, Y) -> 0 [1] minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) [1] ifMinus(true, s(X), Y) -> 0 [1] ifMinus(false, s(X), Y) -> s(minus(X, Y)) [1] quot(0, s(Y)) -> 0 [1] quot(s(X), s(Y)) -> s(quot(minus(X, 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: le(0, Y) -> true [1] le(s(X), 0) -> false [1] le(s(X), s(Y)) -> le(X, Y) [1] minus(0, Y) -> 0 [1] minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) [1] ifMinus(true, s(X), Y) -> 0 [1] ifMinus(false, s(X), Y) -> s(minus(X, Y)) [1] quot(0, s(Y)) -> 0 [1] quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) [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 ifMinus :: true:false -> 0:s -> 0:s -> 0:s 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: ifMinus(v0, v1, v2) -> null_ifMinus [0] quot(v0, v1) -> null_quot [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] And the following fresh constants: null_ifMinus, null_quot, null_le, null_minus ---------------------------------------- (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: le(0, Y) -> true [1] le(s(X), 0) -> false [1] le(s(X), s(Y)) -> le(X, Y) [1] minus(0, Y) -> 0 [1] minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) [1] ifMinus(true, s(X), Y) -> 0 [1] ifMinus(false, s(X), Y) -> s(minus(X, Y)) [1] quot(0, s(Y)) -> 0 [1] quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) [1] ifMinus(v0, v1, v2) -> null_ifMinus [0] quot(v0, v1) -> null_quot [0] le(v0, v1) -> null_le [0] minus(v0, v1) -> null_minus [0] The TRS has the following type information: le :: 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus -> true:false:null_le 0 :: 0:s:null_ifMinus:null_quot:null_minus true :: true:false:null_le s :: 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus false :: true:false:null_le minus :: 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus ifMinus :: true:false:null_le -> 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus quot :: 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus -> 0:s:null_ifMinus:null_quot:null_minus null_ifMinus :: 0:s:null_ifMinus:null_quot:null_minus null_quot :: 0:s:null_ifMinus:null_quot:null_minus null_le :: true:false:null_le null_minus :: 0:s:null_ifMinus:null_quot:null_minus 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_ifMinus => 0 null_quot => 0 null_le => 0 null_minus => 0 ---------------------------------------- (8) Obligation: Complexity RNTS consisting of the following rules: ifMinus(z, z', z'') -{ 1 }-> 0 :|: z = 2, Y >= 0, z'' = Y, z' = 1 + X, X >= 0 ifMinus(z, z', z'') -{ 0 }-> 0 :|: v0 >= 0, z'' = v2, v1 >= 0, z = v0, z' = v1, v2 >= 0 ifMinus(z, z', z'') -{ 1 }-> 1 + minus(X, Y) :|: Y >= 0, z = 1, z'' = Y, z' = 1 + X, X >= 0 le(z, z') -{ 1 }-> le(X, Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 le(z, z') -{ 1 }-> 2 :|: z' = Y, Y >= 0, z = 0 le(z, z') -{ 1 }-> 1 :|: z = 1 + X, X >= 0, z' = 0 le(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 minus(z, z') -{ 1 }-> ifMinus(le(1 + X, Y), 1 + X, Y) :|: z = 1 + X, z' = Y, Y >= 0, X >= 0 minus(z, z') -{ 1 }-> 0 :|: z' = Y, Y >= 0, z = 0 minus(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 quot(z, z') -{ 1 }-> 0 :|: Y >= 0, z' = 1 + Y, z = 0 quot(z, z') -{ 0 }-> 0 :|: v0 >= 0, v1 >= 0, z = v0, z' = v1 quot(z, z') -{ 1 }-> 1 + quot(minus(X, Y), 1 + Y) :|: z = 1 + X, Y >= 0, z' = 1 + Y, X >= 0 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,[le(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[minus(V1, V, Out)],[V1 >= 0,V >= 0]). eq(start(V1, V, V2),0,[ifMinus(V1, V, V2, Out)],[V1 >= 0,V >= 0,V2 >= 0]). eq(start(V1, V, V2),0,[quot(V1, V, Out)],[V1 >= 0,V >= 0]). eq(le(V1, V, Out),1,[],[Out = 2,V = Y1,Y1 >= 0,V1 = 0]). eq(le(V1, V, Out),1,[],[Out = 1,V1 = 1 + X1,X1 >= 0,V = 0]). eq(le(V1, V, Out),1,[le(X2, Y2, Ret)],[Out = Ret,V1 = 1 + X2,Y2 >= 0,V = 1 + Y2,X2 >= 0]). eq(minus(V1, V, Out),1,[],[Out = 0,V = Y3,Y3 >= 0,V1 = 0]). eq(minus(V1, V, Out),1,[le(1 + X3, Y4, Ret0),ifMinus(Ret0, 1 + X3, Y4, Ret1)],[Out = Ret1,V1 = 1 + X3,V = Y4,Y4 >= 0,X3 >= 0]). eq(ifMinus(V1, V, V2, Out),1,[],[Out = 0,V1 = 2,Y5 >= 0,V2 = Y5,V = 1 + X4,X4 >= 0]). eq(ifMinus(V1, V, V2, Out),1,[minus(X5, Y6, Ret11)],[Out = 1 + Ret11,Y6 >= 0,V1 = 1,V2 = Y6,V = 1 + X5,X5 >= 0]). eq(quot(V1, V, Out),1,[],[Out = 0,Y7 >= 0,V = 1 + Y7,V1 = 0]). eq(quot(V1, V, Out),1,[minus(X6, Y8, Ret10),quot(Ret10, 1 + Y8, Ret12)],[Out = 1 + Ret12,V1 = 1 + X6,Y8 >= 0,V = 1 + Y8,X6 >= 0]). eq(ifMinus(V1, V, V2, Out),0,[],[Out = 0,V4 >= 0,V2 = V5,V3 >= 0,V1 = V4,V = V3,V5 >= 0]). eq(quot(V1, V, Out),0,[],[Out = 0,V7 >= 0,V6 >= 0,V1 = V7,V = V6]). eq(le(V1, V, Out),0,[],[Out = 0,V9 >= 0,V8 >= 0,V1 = V9,V = V8]). eq(minus(V1, V, Out),0,[],[Out = 0,V10 >= 0,V11 >= 0,V1 = V10,V = V11]). input_output_vars(le(V1,V,Out),[V1,V],[Out]). input_output_vars(minus(V1,V,Out),[V1,V],[Out]). input_output_vars(ifMinus(V1,V,V2,Out),[V1,V,V2],[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 : [ifMinus/4,minus/3] 2. recursive : [quot/3] 3. non_recursive : [start/3] #### 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/3 Control-Flow Refinement of Cost Relations ===================================== ### Specialization of cost equations le/3 * CE 15 is refined into CE [19] * CE 13 is refined into CE [20] * CE 12 is refined into CE [21] * CE 14 is refined into CE [22] ### Cost equations --> "Loop" of le/3 * CEs [22] --> Loop 11 * CEs [19] --> Loop 12 * CEs [20] --> Loop 13 * CEs [21] --> 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 7 is refined into CE [23,24,25,26] * CE 9 is refined into CE [27] * CE 10 is refined into CE [28] * CE 11 is refined into CE [29] * CE 8 is refined into CE [30,31] ### Cost equations --> "Loop" of minus/3 * CEs [31] --> Loop 15 * CEs [30] --> Loop 16 * CEs [23] --> Loop 17 * CEs [24,25,26,27,28,29] --> Loop 18 ### Ranking functions of CR minus(V1,V,Out) * RF of phase [15]: [V1-1,V1-V] * RF of phase [16]: [V1] #### Partial ranking functions of CR minus(V1,V,Out) * Partial RF of phase [15]: - RF of loop [15:1]: V1-1 V1-V * Partial RF of phase [16]: - RF of loop [16:1]: V1 ### Specialization of cost equations quot/3 * CE 16 is refined into CE [32] * CE 18 is refined into CE [33] * CE 17 is refined into CE [34,35,36] ### Cost equations --> "Loop" of quot/3 * CEs [36] --> Loop 19 * CEs [34] --> Loop 20 * CEs [35] --> Loop 21 * CEs [32,33] --> Loop 22 ### Ranking functions of CR quot(V1,V,Out) * RF of phase [19]: [V1/2-1,V1/2-V/2] * RF of phase [21]: [V1-1] #### Partial ranking functions of CR quot(V1,V,Out) * Partial RF of phase [19]: - RF of loop [19:1]: V1/2-1 V1/2-V/2 * Partial RF of phase [21]: - RF of loop [21:1]: V1-1 ### Specialization of cost equations start/3 * CE 3 is refined into CE [37] * CE 1 is refined into CE [38] * CE 2 is refined into CE [39,40,41] * CE 4 is refined into CE [42,43,44,45,46] * CE 5 is refined into CE [47,48,49] * CE 6 is refined into CE [50,51,52,53,54,55] ### Cost equations --> "Loop" of start/3 * CEs [50,51] --> Loop 23 * CEs [43,48] --> Loop 24 * CEs [37] --> Loop 25 * CEs [39,40,41] --> Loop 26 * CEs [38,42,44,45,46,47,49,52,53,54,55] --> Loop 27 ### Ranking functions of CR start(V1,V,V2) #### Partial ranking functions of CR start(V1,V,V2) 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 [[16],18]: 3*it(16)+2*s(4)+3 Such that:aux(1) =< V1-Out it(16) =< Out s(4) =< aux(1) with precondition: [V=0,Out>=1,V1>=Out] * Chain [[16],17]: 3*it(16)+2 Such that:it(16) =< Out with precondition: [V=0,Out>=1,V1>=Out+1] * Chain [[15],18]: 3*it(15)+2*s(2)+2*s(4)+1*s(8)+3 Such that:aux(1) =< V1-Out it(15) =< Out aux(4) =< V s(4) =< aux(1) s(2) =< aux(4) s(8) =< it(15)*aux(4) with precondition: [V>=1,Out>=1,V1>=Out+V] * Chain [18]: 2*s(2)+2*s(4)+3 Such that:aux(1) =< V1 aux(2) =< V s(4) =< aux(1) s(2) =< aux(2) with precondition: [Out=0,V1>=0,V>=0] * Chain [17]: 2 with precondition: [V=0,Out=0,V1>=1] #### Cost of chains of quot(V1,V,Out): * Chain [[21],22]: 6*it(21)+6*s(25)+1 Such that:aux(9) =< V1 it(21) =< aux(9) s(28) =< it(21)*aux(9) s(25) =< s(28) with precondition: [V=1,Out>=1,V1>=Out+1] * Chain [[21],20,22]: 8*it(21)+6*s(25)+2*s(32)+5 Such that:s(30) =< 1 aux(10) =< V1 it(21) =< aux(10) s(32) =< s(30) s(28) =< it(21)*aux(10) s(25) =< s(28) with precondition: [V=1,Out>=2,V1>=Out] * Chain [[19],22]: 4*it(19)+3*s(45)+4*s(46)+1*s(48)+1 Such that:aux(13) =< V1 aux(12) =< V1+1 aux(11) =< V1-V it(19) =< V1/2-V/2 s(41) =< V s(49) =< aux(12) s(49) =< aux(13) s(45) =< it(19)*aux(11) s(46) =< s(49) s(48) =< s(45)*s(41) with precondition: [V>=2,Out>=1,V1+1>=2*Out+V] * Chain [[19],20,22]: 6*it(19)+2*s(32)+3*s(45)+4*s(46)+1*s(48)+5 Such that:aux(12) =< V1+1 aux(11) =< V1-V aux(14) =< V1 aux(15) =< V it(19) =< aux(14) s(32) =< aux(15) s(49) =< aux(12) s(49) =< aux(14) s(45) =< it(19)*aux(11) s(46) =< s(49) s(48) =< s(45)*aux(15) with precondition: [V>=2,Out>=2,V1+3>=2*Out+V] * Chain [22]: 1 with precondition: [Out=0,V1>=0,V>=0] * Chain [20,22]: 2*s(31)+2*s(32)+5 Such that:s(29) =< V1 s(30) =< V s(31) =< s(29) s(32) =< s(30) with precondition: [Out=1,V1>=1,V>=1] #### Cost of chains of start(V1,V,V2): * Chain [27]: 10*s(51)+16*s(53)+1*s(63)+4*s(71)+3*s(74)+8*s(75)+1*s(76)+3*s(84)+1*s(86)+5 Such that:s(71) =< V1/2-V/2 aux(17) =< V1 aux(18) =< V1+1 aux(19) =< V1-V aux(20) =< V s(53) =< aux(17) s(51) =< aux(20) s(73) =< aux(18) s(73) =< aux(17) s(74) =< s(71)*aux(19) s(75) =< s(73) s(76) =< s(74)*aux(20) s(84) =< s(53)*aux(19) s(86) =< s(84)*aux(20) s(63) =< s(53)*aux(20) with precondition: [V1>=0,V>=0] * Chain [26]: 15*s(89)+4*s(90)+1*s(100)+4 Such that:aux(23) =< V aux(24) =< V2 s(89) =< aux(23) s(90) =< aux(24) s(100) =< s(89)*aux(24) with precondition: [V1=1,V>=1,V2>=0] * Chain [25]: 1 with precondition: [V1=2,V>=1,V2>=0] * Chain [24]: 8*s(103)+3 Such that:aux(25) =< V1 s(103) =< aux(25) with precondition: [V=0,V1>=1] * Chain [23]: 14*s(106)+12*s(108)+2*s(112)+5 Such that:s(109) =< 1 aux(26) =< V1 s(106) =< aux(26) s(112) =< s(109) s(107) =< s(106)*aux(26) s(108) =< s(107) with precondition: [V=1,V1>=2] Closed-form bounds of start(V1,V,V2): ------------------------------------- * Chain [27] with precondition: [V1>=0,V>=0] - Upper bound: 16*V1+5+V*V1+V*V1*nat(V1-V)+3*V1*nat(V1-V)+10*V+nat(V1-V)*V*nat(V1/2-V/2)+(8*V1+8)+nat(V1-V)*3*nat(V1/2-V/2)+nat(V1/2-V/2)*4 - Complexity: n^3 * Chain [26] with precondition: [V1=1,V>=1,V2>=0] - Upper bound: 15*V+4+V2*V+4*V2 - Complexity: n^2 * Chain [25] with precondition: [V1=2,V>=1,V2>=0] - Upper bound: 1 - Complexity: constant * Chain [24] with precondition: [V=0,V1>=1] - Upper bound: 8*V1+3 - Complexity: n * Chain [23] with precondition: [V=1,V1>=2] - Upper bound: 14*V1+7+12*V1*V1 - Complexity: n^2 ### Maximum cost of start(V1,V,V2): max([6*V1+2+max([12*V1*V1+2,2*V1+V*V1+V*V1*nat(V1-V)+3*V1*nat(V1-V)+10*V+nat(V1-V)*V*nat(V1/2-V/2)+(8*V1+8)+nat(V1-V)*3*nat(V1/2-V/2)+nat(V1/2-V/2)*4])+(8*V1+2),15*V+3+nat(V2)*V+nat(V2)*4])+1 Asymptotic class: n^3 * Total analysis performed in 380 ms. ---------------------------------------- (10) BOUNDS(1, n^3) ---------------------------------------- (11) RelTrsToDecreasingLoopProblemProof (LOWER BOUND(ID)) Transformed a relative TRS into a decreasing-loop problem. ---------------------------------------- (12) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 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(0, Y) -> 0 minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) ifMinus(true, s(X), Y) -> 0 ifMinus(false, s(X), Y) -> s(minus(X, Y)) quot(0, s(Y)) -> 0 quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (13) DecreasingLoopProof (LOWER BOUND(ID)) The following loop(s) give(s) rise to the lower bound Omega(n^1): The rewrite sequence le(s(X), s(Y)) ->^+ le(X, Y) gives rise to a decreasing loop by considering the right hand sides subterm at position []. The pumping substitution is [X / s(X), Y / s(Y)]. The result substitution is [ ]. ---------------------------------------- (14) Complex Obligation (BEST) ---------------------------------------- (15) Obligation: Proved the lower bound n^1 for the following obligation: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 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(0, Y) -> 0 minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) ifMinus(true, s(X), Y) -> 0 ifMinus(false, s(X), Y) -> s(minus(X, Y)) quot(0, s(Y)) -> 0 quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) S is empty. Rewrite Strategy: INNERMOST ---------------------------------------- (16) LowerBoundPropagationProof (FINISHED) Propagated lower bound. ---------------------------------------- (17) BOUNDS(n^1, INF) ---------------------------------------- (18) Obligation: Analyzing the following TRS for decreasing loops: The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(n^1, n^3). 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(0, Y) -> 0 minus(s(X), Y) -> ifMinus(le(s(X), Y), s(X), Y) ifMinus(true, s(X), Y) -> 0 ifMinus(false, s(X), Y) -> s(minus(X, Y)) quot(0, s(Y)) -> 0 quot(s(X), s(Y)) -> s(quot(minus(X, Y), s(Y))) S is empty. Rewrite Strategy: INNERMOST