MAYBE Problem: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) Proof: DP Processor: DPs: times#(x,plus(y,1())) -> times#(1(),0()) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) plus#(s(x),s(y)) -> id#(y) plus#(s(x),s(y)) -> id#(x) plus#(s(x),s(y)) -> not#(gt(x,y)) plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) plus#(s(x),s(y)) -> gt#(x,y) plus#(s(x),s(y)) -> if#(gt(x,y),x,y) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(s(x),x) -> id#(x) plus#(s(x),x) -> gt#(x,x) plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) plus#(id(x),s(y)) -> gt#(s(y),y) plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) not#(x) -> if#(x,false(),true()) gt#(s(x),s(y)) -> gt#(x,y) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) TDG Processor: DPs: times#(x,plus(y,1())) -> times#(1(),0()) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) plus#(s(x),s(y)) -> id#(y) plus#(s(x),s(y)) -> id#(x) plus#(s(x),s(y)) -> not#(gt(x,y)) plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) plus#(s(x),s(y)) -> gt#(x,y) plus#(s(x),s(y)) -> if#(gt(x,y),x,y) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(s(x),x) -> id#(x) plus#(s(x),x) -> gt#(x,x) plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) plus#(id(x),s(y)) -> gt#(s(y),y) plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) not#(x) -> if#(x,false(),true()) gt#(s(x),s(y)) -> gt#(x,y) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) graph: gt#(s(x),s(y)) -> gt#(x,y) -> gt#(s(x),s(y)) -> gt#(x,y) plus#(id(x),s(y)) -> gt#(s(y),y) -> gt#(s(x),s(y)) -> gt#(x,y) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(id(x),s(y)) -> gt#(s(y),y) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),x) -> gt#(x,x) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),x) -> id#(x) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> if#(gt(x,y),x,y) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> gt#(x,y) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> not#(gt(x,y)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> id#(x) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) -> plus#(s(x),s(y)) -> id#(y) plus#(s(x),s(y)) -> gt#(x,y) -> gt#(s(x),s(y)) -> gt#(x,y) plus#(s(x),s(y)) -> not#(gt(x,y)) -> not#(x) -> if#(x,false(),true()) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(id(x),s(y)) -> gt#(s(y),y) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),x) -> gt#(x,x) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),x) -> id#(x) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> if#(gt(x,y),x,y) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> gt#(x,y) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> not#(gt(x,y)) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> id#(x) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) -> plus#(s(x),s(y)) -> id#(y) plus#(s(x),x) -> gt#(x,x) -> gt#(s(x),s(y)) -> gt#(x,y) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(id(x),s(y)) -> gt#(s(y),y) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),x) -> gt#(x,x) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),x) -> id#(x) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> if#(gt(x,y),x,y) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> gt#(x,y) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> not#(gt(x,y)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> id#(x) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) -> plus#(s(x),s(y)) -> id#(y) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(id(x),s(y)) -> gt#(s(y),y) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),x) -> gt#(x,x) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),x) -> id#(x) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> if#(gt(x,y),x,y) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> gt#(x,y) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> not#(gt(x,y)) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> id#(x) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) -> plus#(s(x),s(y)) -> id#(y) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(id(x),s(y)) -> gt#(s(y),y) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),x) -> gt#(x,x) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),x) -> id#(x) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> if#(gt(x,y),x,y) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> gt#(x,y) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> not#(gt(x,y)) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> id#(x) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) -> plus#(s(x),s(y)) -> id#(y) times#(x,plus(y,1())) -> times#(1(),0()) -> times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) times#(x,plus(y,1())) -> times#(1(),0()) -> times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) times#(x,plus(y,1())) -> times#(1(),0()) -> times#(x,plus(y,1())) -> plus#(y,times(1(),0())) times#(x,plus(y,1())) -> times#(1(),0()) -> times#(x,plus(y,1())) -> times#(1(),0()) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) -> times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) -> times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) -> times#(x,plus(y,1())) -> plus#(y,times(1(),0())) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) -> times#(x,plus(y,1())) -> times#(1(),0()) Restore Modifier: DPs: times#(x,plus(y,1())) -> times#(1(),0()) times#(x,plus(y,1())) -> plus#(y,times(1(),0())) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) times#(x,plus(y,1())) -> plus#(times(x,plus(y,times(1(),0()))),x) plus#(s(x),s(y)) -> id#(y) plus#(s(x),s(y)) -> id#(x) plus#(s(x),s(y)) -> not#(gt(x,y)) plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) plus#(s(x),s(y)) -> gt#(x,y) plus#(s(x),s(y)) -> if#(gt(x,y),x,y) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(s(x),x) -> id#(x) plus#(s(x),x) -> gt#(x,x) plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) plus#(id(x),s(y)) -> gt#(s(y),y) plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) not#(x) -> if#(x,false(),true()) gt#(s(x),s(y)) -> gt#(x,y) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) SCC Processor: #sccs: 3 #rules: 6 #arcs: 83/400 DPs: times#(x,plus(y,1())) -> times#(1(),0()) times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) Matrix Interpretation Processor: dimension: 1 interpretation: [times#](x0, x1) = x1, [false] = 0, [true] = 0, [zero] = 0, [id](x0) = x0, [not](x0) = x0 + 1, [if](x0, x1, x2) = x0 + x1 + x2, [gt](x0, x1) = 0, [s](x0) = 0, [0] = 0, [times](x0, x1) = x0 + x1, [plus](x0, x1) = x1 + 1, [1] = 1 orientation: times#(x,plus(y,1())) = 2 >= 0 = times#(1(),0()) times#(x,plus(y,1())) = 2 >= 2 = times#(x,plus(y,times(1(),0()))) times(x,plus(y,1())) = x + 2 >= x + 1 = plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) = x + 1 >= x = x times(x,0()) = x >= 0 = 0() plus(s(x),s(y)) = 1 >= 0 = s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) = x + 1 >= 1 = plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) = y + 1 >= y = y plus(id(x),s(y)) = 1 >= 0 = s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) = x >= x = x if(true(),x,y) = x + y >= x = x if(false(),x,y) = x + y >= y = y not(x) = x + 1 >= x = if(x,false(),true()) gt(s(x),zero()) = 0 >= 0 = true() gt(zero(),y) = 0 >= 0 = false() gt(s(x),s(y)) = 0 >= 0 = gt(x,y) problem: DPs: times#(x,plus(y,1())) -> times#(x,plus(y,times(1(),0()))) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) Open DPs: plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) Open DPs: gt#(s(x),s(y)) -> gt#(x,y) TRS: times(x,plus(y,1())) -> plus(times(x,plus(y,times(1(),0()))),x) times(x,1()) -> x times(x,0()) -> 0() plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) plus(zero(),y) -> y plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) id(x) -> x if(true(),x,y) -> x if(false(),x,y) -> y not(x) -> if(x,false(),true()) gt(s(x),zero()) -> true() gt(zero(),y) -> false() gt(s(x),s(y)) -> gt(x,y) Open