MAYBE Problem: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y Proof: DP Processor: DPs: le#(s(x),s(y)) -> le#(x,y) minus#(x,s(y)) -> p#(s(y)) minus#(x,s(y)) -> minus#(x,p(s(y))) minus#(x,s(y)) -> p#(minus(x,p(s(y)))) minus#(x,s(y)) -> le#(x,s(y)) minus#(x,s(y)) -> if#(le(x,s(y)),0(),p(minus(x,p(s(y))))) TRS: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y CDG Processor: DPs: le#(s(x),s(y)) -> le#(x,y) minus#(x,s(y)) -> p#(s(y)) minus#(x,s(y)) -> minus#(x,p(s(y))) minus#(x,s(y)) -> p#(minus(x,p(s(y)))) minus#(x,s(y)) -> le#(x,s(y)) minus#(x,s(y)) -> if#(le(x,s(y)),0(),p(minus(x,p(s(y))))) TRS: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y graph: minus#(x,s(y)) -> minus#(x,p(s(y))) -> minus#(x,s(y)) -> p#(s(y)) minus#(x,s(y)) -> minus#(x,p(s(y))) -> minus#(x,s(y)) -> minus#(x,p(s(y))) minus#(x,s(y)) -> minus#(x,p(s(y))) -> minus#(x,s(y)) -> p#(minus(x,p(s(y)))) minus#(x,s(y)) -> minus#(x,p(s(y))) -> minus#(x,s(y)) -> le#(x,s(y)) minus#(x,s(y)) -> minus#(x,p(s(y))) -> minus#(x,s(y)) -> if#(le(x,s(y)),0(),p(minus(x,p(s(y))))) minus#(x,s(y)) -> le#(x,s(y)) -> le#(s(x),s(y)) -> le#(x,y) le#(s(x),s(y)) -> le#(x,y) -> le#(s(x),s(y)) -> le#(x,y) Restore Modifier: DPs: le#(s(x),s(y)) -> le#(x,y) minus#(x,s(y)) -> p#(s(y)) minus#(x,s(y)) -> minus#(x,p(s(y))) minus#(x,s(y)) -> p#(minus(x,p(s(y)))) minus#(x,s(y)) -> le#(x,s(y)) minus#(x,s(y)) -> if#(le(x,s(y)),0(),p(minus(x,p(s(y))))) TRS: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y SCC Processor: #sccs: 2 #rules: 2 #arcs: 7/36 DPs: minus#(x,s(y)) -> minus#(x,p(s(y))) TRS: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y Open DPs: le#(s(x),s(y)) -> le#(x,y) TRS: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y Matrix Interpretation Processor: dimension: 1 interpretation: [le#](x0, x1) = x1 + 1, [if](x0, x1, x2) = x1 + x2, [minus](x0, x1) = x0, [false] = 0, [true] = 0, [le](x0, x1) = 0, [s](x0) = x0 + 1, [p](x0) = x0, [0] = 0 orientation: le#(s(x),s(y)) = y + 2 >= y + 1 = le#(x,y) p(0()) = 0 >= 0 = 0() p(s(x)) = x + 1 >= x = x le(0(),y) = 0 >= 0 = true() le(s(x),0()) = 0 >= 0 = false() le(s(x),s(y)) = 0 >= 0 = le(x,y) minus(x,0()) = x >= x = x minus(x,s(y)) = x >= x = if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) = x + y >= x = x if(false(),x,y) = x + y >= y = y problem: DPs: TRS: p(0()) -> 0() p(s(x)) -> x le(0(),y) -> true() le(s(x),0()) -> false() le(s(x),s(y)) -> le(x,y) minus(x,0()) -> x minus(x,s(y)) -> if(le(x,s(y)),0(),p(minus(x,p(s(y))))) if(true(),x,y) -> x if(false(),x,y) -> y Qed