YES Problem: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x Proof: DP Processor: DPs: cond1#(true(),x,y) -> gr#(y,0()) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) cond2#(true(),x,y) -> p#(y) cond2#(true(),x,y) -> gr#(y,0()) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) cond2#(false(),x,y) -> p#(x) cond2#(false(),x,y) -> gr#(x,0()) cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) gr#(s(x),s(y)) -> gr#(x,y) TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x TDG Processor: DPs: cond1#(true(),x,y) -> gr#(y,0()) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) cond2#(true(),x,y) -> p#(y) cond2#(true(),x,y) -> gr#(y,0()) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) cond2#(false(),x,y) -> p#(x) cond2#(false(),x,y) -> gr#(x,0()) cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) gr#(s(x),s(y)) -> gr#(x,y) TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x graph: cond2#(false(),x,y) -> gr#(x,0()) -> gr#(s(x),s(y)) -> gr#(x,y) cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) -> cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) -> cond1#(true(),x,y) -> gr#(y,0()) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) -> cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) -> cond2#(false(),x,y) -> gr#(x,0()) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) -> cond2#(false(),x,y) -> p#(x) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) -> cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) -> cond2#(true(),x,y) -> gr#(y,0()) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) -> cond2#(true(),x,y) -> p#(y) cond2#(true(),x,y) -> gr#(y,0()) -> gr#(s(x),s(y)) -> gr#(x,y) gr#(s(x),s(y)) -> gr#(x,y) -> gr#(s(x),s(y)) -> gr#(x,y) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) -> cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) -> cond2#(false(),x,y) -> gr#(x,0()) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) -> cond2#(false(),x,y) -> p#(x) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) -> cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) -> cond2#(true(),x,y) -> gr#(y,0()) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) -> cond2#(true(),x,y) -> p#(y) cond1#(true(),x,y) -> gr#(y,0()) -> gr#(s(x),s(y)) -> gr#(x,y) SCC Processor: #sccs: 2 #rules: 4 #arcs: 18/81 DPs: cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) cond1#(true(),x,y) -> cond2#(gr(y,0()),x,y) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x Matrix Interpretation Processor: dim=1 interpretation: [cond2#](x0, x1, x2) = 5/2x1, [cond1#](x0, x1, x2) = x0 + 3x1, [s](x0) = 3x0 + 2, [false] = 0, [p](x0) = 1/2x0, [cond2](x0, x1, x2) = 5/2x1 + 1, [gr](x0, x1) = x0 + 5/2x1, [0] = 0, [cond1](x0, x1, x2) = x0 + 3x1 + 1/2, [true] = 1 orientation: cond2#(false(),x,y) = 5/2x >= 5/2x = cond1#(gr(x,0()),p(x),y) cond1#(true(),x,y) = 3x + 1 >= 5/2x = cond2#(gr(y,0()),x,y) cond2#(true(),x,y) = 5/2x >= 5/2x = cond2#(gr(y,0()),x,p(y)) cond1(true(),x,y) = 3x + 3/2 >= 5/2x + 1 = cond2(gr(y,0()),x,y) cond2(true(),x,y) = 5/2x + 1 >= 5/2x + 1 = cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) = 5/2x + 1 >= 5/2x + 1/2 = cond1(gr(x,0()),p(x),y) gr(0(),x) = 5/2x >= 0 = false() gr(s(x),0()) = 3x + 2 >= 1 = true() gr(s(x),s(y)) = 3x + 15/2y + 7 >= x + 5/2y = gr(x,y) p(0()) = 0 >= 0 = 0() p(s(x)) = 3/2x + 1 >= x = x problem: DPs: cond2#(false(),x,y) -> cond1#(gr(x,0()),p(x),y) cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x SCC Processor: #sccs: 1 #rules: 1 #arcs: 5/4 DPs: cond2#(true(),x,y) -> cond2#(gr(y,0()),x,p(y)) TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x Matrix Interpretation Processor: dim=1 interpretation: [cond2#](x0, x1, x2) = 2x0 + 2x2, [s](x0) = 2x0 + 1, [false] = 0, [p](x0) = 1/2x0, [cond2](x0, x1, x2) = x2, [gr](x0, x1) = 1/2x0 + 2x1, [0] = 0, [cond1](x0, x1, x2) = x2, [true] = 1/2 orientation: cond2#(true(),x,y) = 2y + 1 >= 2y = cond2#(gr(y,0()),x,p(y)) cond1(true(),x,y) = y >= y = cond2(gr(y,0()),x,y) cond2(true(),x,y) = y >= 1/2y = cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) = y >= y = cond1(gr(x,0()),p(x),y) gr(0(),x) = 2x >= 0 = false() gr(s(x),0()) = x + 1/2 >= 1/2 = true() gr(s(x),s(y)) = x + 4y + 5/2 >= 1/2x + 2y = gr(x,y) p(0()) = 0 >= 0 = 0() p(s(x)) = x + 1/2 >= x = x problem: DPs: TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x Qed DPs: gr#(s(x),s(y)) -> gr#(x,y) TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x Subterm Criterion Processor: simple projection: pi(gr#) = 1 problem: DPs: TRS: cond1(true(),x,y) -> cond2(gr(y,0()),x,y) cond2(true(),x,y) -> cond2(gr(y,0()),x,p(y)) cond2(false(),x,y) -> cond1(gr(x,0()),p(x),y) gr(0(),x) -> false() gr(s(x),0()) -> true() gr(s(x),s(y)) -> gr(x,y) p(0()) -> 0() p(s(x)) -> x Qed