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