Input TRS: 1: plus(x,0()) -> x 2: plus(0(),y) -> y 3: plus(s(x),y) -> s(plus(x,y)) 4: times(0(),y) -> 0() 5: times(s(0()),y) -> y 6: times(s(x),y) -> plus(y,times(x,y)) 7: div(0(),y) -> 0() 8: div(x,y) -> quot(x,y,y) 9: quot(0(),s(y),z) -> 0() 10: quot(s(x),s(y),z) -> quot(x,y,z) 11: quot(x,0(),s(z)) -> s(div(x,s(z))) 12: div(div(x,y),z) -> div(x,times(y,z)) 13: eq(0(),0()) -> true() 14: eq(s(x),0()) -> false() 15: eq(0(),s(y)) -> false() 16: eq(s(x),s(y)) -> eq(x,y) 17: divides(y,x) -> eq(x,times(div(x,y),y)) 18: prime(s(s(x))) -> pr(s(s(x)),s(x)) 19: pr(x,s(0())) -> true() 20: pr(x,s(s(y))) -> if(divides(s(s(y)),x),x,s(y)) 21: if(true(),x,y) -> false() 22: if(false(),x,y) -> pr(x,y) Number of strict rules: 22 Direct Order(PosReal,>,Poly) ... failed. Freezing ... failed. Dependency Pairs: #1: #times(s(x),y) -> #plus(y,times(x,y)) #2: #times(s(x),y) -> #times(x,y) #3: #quot(x,0(),s(z)) -> #div(x,s(z)) #4: #div(div(x,y),z) -> #div(x,times(y,z)) #5: #div(div(x,y),z) -> #times(y,z) #6: #pr(x,s(s(y))) -> #if(divides(s(s(y)),x),x,s(y)) #7: #pr(x,s(s(y))) -> #divides(s(s(y)),x) #8: #quot(s(x),s(y),z) -> #quot(x,y,z) #9: #if(false(),x,y) -> #pr(x,y) #10: #divides(y,x) -> #eq(x,times(div(x,y),y)) #11: #divides(y,x) -> #times(div(x,y),y) #12: #divides(y,x) -> #div(x,y) #13: #eq(s(x),s(y)) -> #eq(x,y) #14: #plus(s(x),y) -> #plus(x,y) #15: #div(x,y) -> #quot(x,y,y) #16: #prime(s(s(x))) -> #pr(s(s(x)),s(x)) Number of SCCs: 5, DPs: 9, edges: 13 SCC { #14 } Removing DPs: Order(PosReal,>,Sum)... succeeded. #div(x1,x2) weight: 0 s(x1) weight: (/ 1 2) + x1 prime(x1) weight: 0 #plus(x1,x2) weight: x1 #pr(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 div(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: 0 #prime(x1) weight: 0 #times(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3) weight: 0 quot(x1,x2,x3) weight: 0 times(x1,x2) weight: 0 pr(x1,x2) weight: 0 #divides(x1,x2) weight: 0 plus(x1,x2) weight: 0 #if(x1,x2,x3) weight: 0 #quot(x1,x2,x3) weight: 0 divides(x1,x2) weight: 0 Usable rules: { } Removed DPs: #14 Number of SCCs: 4, DPs: 8, edges: 12 SCC { #2 } Removing DPs: Order(PosReal,>,Sum)... succeeded. #div(x1,x2) weight: 0 s(x1) weight: (/ 1 2) + x1 prime(x1) weight: 0 #plus(x1,x2) weight: 0 #pr(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 div(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: 0 #prime(x1) weight: 0 #times(x1,x2) weight: x1 0() weight: 0 if(x1,x2,x3) weight: 0 quot(x1,x2,x3) weight: 0 times(x1,x2) weight: 0 pr(x1,x2) weight: 0 #divides(x1,x2) weight: 0 plus(x1,x2) weight: 0 #if(x1,x2,x3) weight: 0 #quot(x1,x2,x3) weight: 0 divides(x1,x2) weight: 0 Usable rules: { } Removed DPs: #2 Number of SCCs: 3, DPs: 7, edges: 11 SCC { #13 } Removing DPs: Order(PosReal,>,Sum)... succeeded. #div(x1,x2) weight: 0 s(x1) weight: (/ 1 2) + x1 prime(x1) weight: 0 #plus(x1,x2) weight: 0 #pr(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 div(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: x2 #prime(x1) weight: 0 #times(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3) weight: 0 quot(x1,x2,x3) weight: 0 times(x1,x2) weight: 0 pr(x1,x2) weight: 0 #divides(x1,x2) weight: 0 plus(x1,x2) weight: 0 #if(x1,x2,x3) weight: 0 #quot(x1,x2,x3) weight: 0 divides(x1,x2) weight: 0 Usable rules: { } Removed DPs: #13 Number of SCCs: 2, DPs: 6, edges: 10 SCC { #6 #9 } Removing DPs: Order(PosReal,>,Sum)... succeeded. #div(x1,x2) weight: 0 s(x1) weight: (/ 1 4) + x1 prime(x1) weight: 0 #plus(x1,x2) weight: 0 #pr(x1,x2) weight: x2 eq(x1,x2) weight: 0 false() weight: 0 div(x1,x2) weight: (/ 1 8) + x2 true() weight: 0 #eq(x1,x2) weight: 0 #prime(x1) weight: 0 #times(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3) weight: 0 quot(x1,x2,x3) weight: (/ 1 4) times(x1,x2) weight: (/ 1 8) + x1 + x2 pr(x1,x2) weight: 0 #divides(x1,x2) weight: 0 plus(x1,x2) weight: (/ 3 8) + x2 #if(x1,x2,x3) weight: (/ 1 8) + x3 #quot(x1,x2,x3) weight: 0 divides(x1,x2) weight: (/ 1 8) Usable rules: { 13..16 } Removed DPs: #6 #9 Number of SCCs: 1, DPs: 4, edges: 8 SCC { #3 #4 #8 #15 } Removing DPs: Order(PosReal,>,Sum)... succeeded. #div(x1,x2) weight: x1 s(x1) weight: (/ 1 4) + x1 prime(x1) weight: 0 #plus(x1,x2) weight: 0 #pr(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 div(x1,x2) weight: (/ 1 8) + x1 + x2 true() weight: 0 #eq(x1,x2) weight: 0 #prime(x1) weight: 0 #times(x1,x2) weight: 0 0() weight: 0 if(x1,x2,x3) weight: 0 quot(x1,x2,x3) weight: (/ 1 4) times(x1,x2) weight: (/ 1 4) + x1 pr(x1,x2) weight: 0 #divides(x1,x2) weight: 0 plus(x1,x2) weight: (/ 5 8) #if(x1,x2,x3) weight: (/ 1 8) #quot(x1,x2,x3) weight: x1 divides(x1,x2) weight: (/ 1 8) Usable rules: { } Removed DPs: #4 #8 Number of SCCs: 1, DPs: 2, edges: 2 SCC { #3 #15 } Removing DPs: Order(PosReal,>,Sum)... Order(PosReal,>,Max)... succeeded. #div(x1,x2) weight: max{0, (/ 1 2) + x2} s(x1) weight: 0 prime(x1) weight: 0 #plus(x1,x2) weight: 0 #pr(x1,x2) weight: 0 eq(x1,x2) weight: 0 false() weight: 0 div(x1,x2) weight: 0 true() weight: 0 #eq(x1,x2) weight: 0 #prime(x1) weight: 0 #times(x1,x2) weight: 0 0() weight: (/ 1 4) if(x1,x2,x3) weight: 0 quot(x1,x2,x3) weight: 0 times(x1,x2) weight: 0 pr(x1,x2) weight: 0 #divides(x1,x2) weight: 0 plus(x1,x2) weight: 0 #if(x1,x2,x3) weight: 0 #quot(x1,x2,x3) weight: max{0, (/ 1 4) + x2} divides(x1,x2) weight: 0 Usable rules: { } Removed DPs: #15 Number of SCCs: 0, DPs: 0, edges: 0 YES