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