YES We show the termination of the TRS R: minus(x,|0|()) -> x minus(s(x),s(y)) -> minus(x,y) quot(|0|(),s(y)) -> |0|() quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) plus(|0|(),y) -> y plus(s(x),y) -> s(plus(x,y)) minus(minus(x,y),z) -> minus(x,plus(y,z)) app(nil(),k) -> k app(l,nil()) -> l app(cons(x,l),k) -> cons(x,app(l,k)) sum(cons(x,nil())) -> cons(x,nil()) sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) 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 decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(x,y) p2: quot#(s(x),s(y)) -> quot#(minus(x,y),s(y)) p3: quot#(s(x),s(y)) -> minus#(x,y) p4: plus#(s(x),y) -> plus#(x,y) p5: minus#(minus(x,y),z) -> minus#(x,plus(y,z)) p6: minus#(minus(x,y),z) -> plus#(y,z) p7: app#(cons(x,l),k) -> app#(l,k) p8: sum#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) p9: sum#(cons(x,cons(y,l))) -> plus#(x,y) p10: sum#(app(l,cons(x,cons(y,k)))) -> sum#(app(l,sum(cons(x,cons(y,k))))) p11: sum#(app(l,cons(x,cons(y,k)))) -> app#(l,sum(cons(x,cons(y,k)))) p12: sum#(app(l,cons(x,cons(y,k)))) -> sum#(cons(x,cons(y,k))) p13: plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) p14: plus#(s(x),s(y)) -> if#(gt(x,y),x,y) p15: plus#(s(x),s(y)) -> gt#(x,y) p16: plus#(s(x),s(y)) -> if#(not(gt(x,y)),id(x),id(y)) p17: plus#(s(x),s(y)) -> not#(gt(x,y)) p18: plus#(s(x),s(y)) -> id#(x) p19: plus#(s(x),s(y)) -> id#(y) p20: plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) p21: plus#(s(x),x) -> if#(gt(x,x),id(x),id(x)) p22: plus#(s(x),x) -> gt#(x,x) p23: plus#(s(x),x) -> id#(x) p24: plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) p25: plus#(id(x),s(y)) -> if#(gt(s(y),y),y,s(y)) p26: plus#(id(x),s(y)) -> gt#(s(y),y) p27: not#(x) -> if#(x,false(),true()) p28: gt#(s(x),s(y)) -> gt#(x,y) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The estimated dependency graph contains the following SCCs: {p2} {p1, p5} {p10} {p8} {p4, p13, p20, p24} {p7} {p28} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: quot#(s(x),s(y)) -> quot#(minus(x,y),s(y)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of r1, r2, r7 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: quot#_A(x1,x2) = x1 + 1 s_A(x1) = x1 + 6 minus_A(x1,x2) = x1 + 4 |0|_A() = 1 plus_A(x1,x2) = 3 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: quot#_A(x1,x2) = max{0, x2 - 53} s_A(x1) = x1 + 70 minus_A(x1,x2) = x1 + 70 |0|_A = 71 plus_A(x1,x2) = max{54, x1 - 46, x2 - 8} quot#!_A(x1,x2) = max{x1 + 70, x2 - 52} s!_A(x1) = x1 + 14 minus!_A(x1,x2) = 9 |0|!_A = 7 plus!_A(x1,x2) = max{268, x2 + 9} partial status: pi(quot#) = [1] pi(s) = [] pi(minus) = [] pi(|0|) = [] pi(plus) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(x,y) p2: minus#(minus(x,y),z) -> minus#(x,plus(y,z)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of r1, r19 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: minus#_A(x1,x2) = x1 s_A(x1) = x1 + 22 minus_A(x1,x2) = x1 + x2 + 24 plus_A(x1,x2) = x1 + 9 |0|_A() = 1 if_A(x1,x2,x3) = x2 + 11 true_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = max{0, x1 - 5} s_A(x1) = max{6, x1} minus_A(x1,x2) = max{5, x1, x2} plus_A(x1,x2) = 1 |0|_A = 2 if_A(x1,x2,x3) = max{17, x1 - 1, x2} true_A = 2 minus#!_A(x1,x2) = max{3, x1 - 19} s!_A(x1) = 2 minus!_A(x1,x2) = max{24, x1 + 17} plus!_A(x1,x2) = max{x1 - 18, x2 + 15} |0|!_A = 1 if!_A(x1,x2,x3) = max{x1 + 31, x2 - 13} true!_A = 6 partial status: pi(minus#) = [] pi(s) = [] pi(minus) = [2] pi(plus) = [1] pi(|0|) = [] pi(if) = [] pi(true) = [] The following rules are removed: p1, p2 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sum#(app(l,cons(x,cons(y,k)))) -> sum#(app(l,sum(cons(x,cons(y,k))))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of r5, r6, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = x1 app_A(x1,x2) = x1 + x2 + 3 cons_A(x1,x2) = 2 sum_A(x1) = x1 plus_A(x1,x2) = x2 + 3 |0|_A() = 1 s_A(x1) = 0 nil_A() = 2 if_A(x1,x2,x3) = x2 + x3 + 5 gt_A(x1,x2) = x2 + 2 not_A(x1) = 8 id_A(x1) = x1 + 4 zero_A() = 2 true_A() = 1 false_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sum#_A(x1) = max{0, x1 - 68} app_A(x1,x2) = max{x1 + 67, x2 + 32} cons_A(x1,x2) = max{33, x1 + 4, x2} sum_A(x1) = max{5, x1} plus_A(x1,x2) = max{29, x1 - 15, x2} |0|_A = 4 s_A(x1) = max{8, x1 - 15} nil_A = 1 if_A(x1,x2,x3) = max{39, x2, x3} gt_A(x1,x2) = max{15, x1 - 15, x2 - 15} not_A(x1) = max{0, x1 - 15} id_A(x1) = max{3, x1} zero_A = 0 true_A = 16 false_A = 16 sum#!_A(x1) = 71 app!_A(x1,x2) = max{x1 + 72, x2 + 37} cons!_A(x1,x2) = x2 + 2 sum!_A(x1) = 5 plus!_A(x1,x2) = max{24, x1 - 15, x2 - 15} |0|!_A = 2 s!_A(x1) = max{0, x1 - 4} nil!_A = 4 if!_A(x1,x2,x3) = 2 gt!_A(x1,x2) = max{25, x1 - 3, x2 - 9} not!_A(x1) = max{27, x1 - 16} id!_A(x1) = x1 + 3 zero!_A = 27 true!_A = 26 false!_A = 0 partial status: pi(sum#) = [1] pi(app) = [2] pi(cons) = [] pi(sum) = [] pi(plus) = [] pi(|0|) = [] pi(s) = [] pi(nil) = [] pi(if) = [] pi(gt) = [2] pi(not) = [] pi(id) = [1] pi(zero) = [] pi(true) = [] pi(false) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sum#(cons(x,cons(y,l))) -> sum#(cons(plus(x,y),l)) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of r22 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = x1 + 1 cons_A(x1,x2) = x2 + 2 plus_A(x1,x2) = x1 + 6 gt_A(x1,x2) = 2 s_A(x1) = 3 zero_A() = 20 true_A() = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sum#_A(x1) = 0 cons_A(x1,x2) = max{218, x2 + 73} plus_A(x1,x2) = max{x1 + 73, x2 + 27} gt_A(x1,x2) = max{81, x1 - 19, x2 - 19} s_A(x1) = max{18, x1 + 13} zero_A = 14 true_A = 41 sum#!_A(x1) = max{1, x1 - 144} cons!_A(x1,x2) = max{3, x2 - 117} plus!_A(x1,x2) = max{0, x1 - 77} gt!_A(x1,x2) = max{2, x2 - 20} s!_A(x1) = max{7, x1 - 19} zero!_A = 4 true!_A = 1 partial status: pi(sum#) = [1] pi(cons) = [] pi(plus) = [1] pi(gt) = [] pi(s) = [] pi(zero) = [] pi(true) = [] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) p3: plus#(s(x),x) -> plus#(if(gt(x,x),id(x),id(x)),s(x)) p4: plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of r18, r19, r20, r21, r22, r23, r24 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = 7 s_A(x1) = 10 id_A(x1) = x1 + 8 if_A(x1,x2,x3) = x2 + x3 + 1 gt_A(x1,x2) = 2 not_A(x1) = x1 + 4 true_A() = 1 false_A() = 1 zero_A() = 2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 68, x2 - 101} s_A(x1) = x1 + 67 id_A(x1) = max{58, x1} if_A(x1,x2,x3) = max{19, x1 - 196, x2, x3} gt_A(x1,x2) = max{188, x1 - 68, x2 - 68} not_A(x1) = max{19, x1 - 46} true_A = 1 false_A = 19 zero_A = 67 plus#!_A(x1,x2) = max{x1 + 7, x2 + 3} s!_A(x1) = x1 + 121 id!_A(x1) = max{0, x1 - 367} if!_A(x1,x2,x3) = max{122, x1 - 20, x2 - 59, x3 - 68} gt!_A(x1,x2) = max{73, x1 - 68, x2 - 68} not!_A(x1) = max{1, x1 - 189} true!_A = 72 false!_A = 0 zero!_A = 73 partial status: pi(plus#) = [] pi(s) = [] pi(id) = [1] pi(if) = [] pi(gt) = [] pi(not) = [1] pi(true) = [] pi(false) = [] pi(zero) = [] The following rules are removed: p3, p4 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: plus#(id(x),s(y)) -> plus#(x,if(gt(s(y),y),y,s(y))) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of r19, r20, r22, r23, r24 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = x1 + 1 s_A(x1) = x1 + 2 id_A(x1) = x1 + 7 if_A(x1,x2,x3) = x2 + x3 + 10 gt_A(x1,x2) = x2 + 12 true_A() = 1 false_A() = 1 zero_A() = 2 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 64, x2 - 36} s_A(x1) = x1 + 33 id_A(x1) = x1 + 25 if_A(x1,x2,x3) = max{35, x1 - 1, x2 + 33, x3} gt_A(x1,x2) = max{34, x1 - 34, x2 - 34} true_A = 1 false_A = 2 zero_A = 33 plus#!_A(x1,x2) = max{0, x1 - 34, x2 - 147} s!_A(x1) = 5 id!_A(x1) = max{6, x1 + 2} if!_A(x1,x2,x3) = max{7, x1 - 44, x2 - 26, x3 - 26} gt!_A(x1,x2) = max{3, x1 - 113, x2 - 113} true!_A = 2 false!_A = 0 zero!_A = 3 partial status: pi(plus#) = [1] pi(s) = [] pi(id) = [] pi(if) = [] pi(gt) = [2] pi(true) = [] pi(false) = [] pi(zero) = [] The following rules are removed: p1, p2 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: app#(cons(x,l),k) -> app#(l,k) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: app#_A(x1,x2) = x1 cons_A(x1,x2) = x1 + x2 + 8 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = 0 cons_A(x1,x2) = max{0, x1 - 17, x2 - 5} app#!_A(x1,x2) = max{6, x1 - 1, x2 - 1} cons!_A(x1,x2) = max{x1 - 69, x2 + 5} partial status: pi(app#) = [] pi(cons) = [2] The following rules are removed: p1 Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: gt#(s(x),s(y)) -> gt#(x,y) and R consists of: r1: minus(x,|0|()) -> x r2: minus(s(x),s(y)) -> minus(x,y) r3: quot(|0|(),s(y)) -> |0|() r4: quot(s(x),s(y)) -> s(quot(minus(x,y),s(y))) r5: plus(|0|(),y) -> y r6: plus(s(x),y) -> s(plus(x,y)) r7: minus(minus(x,y),z) -> minus(x,plus(y,z)) r8: app(nil(),k) -> k r9: app(l,nil()) -> l r10: app(cons(x,l),k) -> cons(x,app(l,k)) r11: sum(cons(x,nil())) -> cons(x,nil()) r12: sum(cons(x,cons(y,l))) -> sum(cons(plus(x,y),l)) r13: sum(app(l,cons(x,cons(y,k)))) -> sum(app(l,sum(cons(x,cons(y,k))))) r14: plus(s(x),s(y)) -> s(s(plus(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))))) r15: plus(s(x),x) -> plus(if(gt(x,x),id(x),id(x)),s(x)) r16: plus(zero(),y) -> y r17: plus(id(x),s(y)) -> s(plus(x,if(gt(s(y),y),y,s(y)))) r18: id(x) -> x r19: if(true(),x,y) -> x r20: if(false(),x,y) -> y r21: not(x) -> if(x,false(),true()) r22: gt(s(x),zero()) -> true() r23: gt(zero(),y) -> false() r24: gt(s(x),s(y)) -> gt(x,y) The set of usable rules consists of (no rules) Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: gt#_A(x1,x2) = x1 + x2 + 16 s_A(x1) = x1 + 15 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: gt#_A(x1,x2) = max{0, x1 - 11, x2 - 11} s_A(x1) = x1 + 10 gt#!_A(x1,x2) = max{1, x1 - 50, x2 - 52} s!_A(x1) = max{3, x1 - 51} partial status: pi(gt#) = [1] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains.