MAYBE Problem: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) Proof: DP Processor: DPs: div#(x,s(y)) -> d#(x,s(y),0()) d#(x,s(y),z) -> ge#(x,z) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) cond#(true(),x,y,z) -> plus#(s(y),z) cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) ge#(s(u),s(v)) -> ge#(u,v) plus#(n,s(m)) -> plus#(n,m) plus#(plus(n,m),u) -> plus#(m,u) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) TRS: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) Usable Rule Processor: DPs: div#(x,s(y)) -> d#(x,s(y),0()) d#(x,s(y),z) -> ge#(x,z) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) cond#(true(),x,y,z) -> plus#(s(y),z) cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) ge#(s(u),s(v)) -> ge#(u,v) plus#(n,s(m)) -> plus#(n,m) plus#(plus(n,m),u) -> plus#(m,u) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) TRS: ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) TDG Processor: DPs: div#(x,s(y)) -> d#(x,s(y),0()) d#(x,s(y),z) -> ge#(x,z) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) cond#(true(),x,y,z) -> plus#(s(y),z) cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) ge#(s(u),s(v)) -> ge#(u,v) plus#(n,s(m)) -> plus#(n,m) plus#(plus(n,m),u) -> plus#(m,u) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) TRS: ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) graph: plus#(plus(n,m),u) -> plus#(m,u) -> plus#(plus(n,m),u) -> plus#(n,plus(m,u)) plus#(plus(n,m),u) -> plus#(m,u) -> plus#(plus(n,m),u) -> plus#(m,u) plus#(plus(n,m),u) -> plus#(m,u) -> plus#(n,s(m)) -> plus#(n,m) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) -> plus#(plus(n,m),u) -> plus#(n,plus(m,u)) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) -> plus#(plus(n,m),u) -> plus#(m,u) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) -> plus#(n,s(m)) -> plus#(n,m) plus#(n,s(m)) -> plus#(n,m) -> plus#(plus(n,m),u) -> plus#(n,plus(m,u)) plus#(n,s(m)) -> plus#(n,m) -> plus#(plus(n,m),u) -> plus#(m,u) plus#(n,s(m)) -> plus#(n,m) -> plus#(n,s(m)) -> plus#(n,m) cond#(true(),x,y,z) -> plus#(s(y),z) -> plus#(plus(n,m),u) -> plus#(n,plus(m,u)) cond#(true(),x,y,z) -> plus#(s(y),z) -> plus#(plus(n,m),u) -> plus#(m,u) cond#(true(),x,y,z) -> plus#(s(y),z) -> plus#(n,s(m)) -> plus#(n,m) cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) -> d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) -> d#(x,s(y),z) -> ge#(x,z) ge#(s(u),s(v)) -> ge#(u,v) -> ge#(s(u),s(v)) -> ge#(u,v) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) -> cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) -> cond#(true(),x,y,z) -> plus#(s(y),z) d#(x,s(y),z) -> ge#(x,z) -> ge#(s(u),s(v)) -> ge#(u,v) div#(x,s(y)) -> d#(x,s(y),0()) -> d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) div#(x,s(y)) -> d#(x,s(y),0()) -> d#(x,s(y),z) -> ge#(x,z) Restore Modifier: DPs: div#(x,s(y)) -> d#(x,s(y),0()) d#(x,s(y),z) -> ge#(x,z) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) cond#(true(),x,y,z) -> plus#(s(y),z) cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) ge#(s(u),s(v)) -> ge#(u,v) plus#(n,s(m)) -> plus#(n,m) plus#(plus(n,m),u) -> plus#(m,u) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) TRS: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) SCC Processor: #sccs: 3 #rules: 6 #arcs: 20/81 DPs: cond#(true(),x,y,z) -> d#(x,s(y),plus(s(y),z)) d#(x,s(y),z) -> cond#(ge(x,z),x,y,z) TRS: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) Open DPs: ge#(s(u),s(v)) -> ge#(u,v) TRS: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) Open DPs: plus#(plus(n,m),u) -> plus#(m,u) plus#(n,s(m)) -> plus#(n,m) plus#(plus(n,m),u) -> plus#(n,plus(m,u)) TRS: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) Matrix Interpretation Processor: dimension: 1 interpretation: [plus#](x0, x1) = x0, [false] = 0, [plus](x0, x1) = x0 + x1 + 1, [true] = 0, [cond](x0, x1, x2, x3) = 0, [ge](x0, x1) = 0, [d](x0, x1, x2) = 0, [0] = 0, [div](x0, x1) = 1, [s](x0) = 0 orientation: plus#(plus(n,m),u) = m + n + 1 >= m = plus#(m,u) plus#(n,s(m)) = n >= n = plus#(n,m) plus#(plus(n,m),u) = m + n + 1 >= n = plus#(n,plus(m,u)) div(x,s(y)) = 1 >= 0 = d(x,s(y),0()) d(x,s(y),z) = 0 >= 0 = cond(ge(x,z),x,y,z) cond(true(),x,y,z) = 0 >= 0 = s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) = 0 >= 0 = 0() ge(u,0()) = 0 >= 0 = true() ge(0(),s(v)) = 0 >= 0 = false() ge(s(u),s(v)) = 0 >= 0 = ge(u,v) plus(n,0()) = n + 1 >= n = n plus(n,s(m)) = n + 1 >= 0 = s(plus(n,m)) plus(plus(n,m),u) = m + n + u + 2 >= m + n + u + 2 = plus(n,plus(m,u)) problem: DPs: plus#(n,s(m)) -> plus#(n,m) TRS: div(x,s(y)) -> d(x,s(y),0()) d(x,s(y),z) -> cond(ge(x,z),x,y,z) cond(true(),x,y,z) -> s(d(x,s(y),plus(s(y),z))) cond(false(),x,y,z) -> 0() ge(u,0()) -> true() ge(0(),s(v)) -> false() ge(s(u),s(v)) -> ge(u,v) plus(n,0()) -> n plus(n,s(m)) -> s(plus(n,m)) plus(plus(n,m),u) -> plus(n,plus(m,u)) Open