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