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, r8, r9, r11 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: quot#_A(x1,x2) = max{x1 - 28, x2 + 6} s_A(x1) = x1 + 30 minus_A(x1,x2) = x1 + 25 |0|_A = 24 plus_A(x1,x2) = max{x1 - 12, x2 + 28} app_A(x1,x2) = max{x1 + 74, x2 + 10} nil_A = 69 sum_A(x1) = max{73, x1 + 11} cons_A(x1,x2) = max{110, x1 - 40, x2 + 41} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: quot#_A(x1,x2) = x1 s_A(x1) = x1 + 3 minus_A(x1,x2) = x1 + 1 |0|_A() = 2 plus_A(x1,x2) = 1 app_A(x1,x2) = x1 + x2 nil_A() = 1 sum_A(x1) = x1 + 1 cons_A(x1,x2) = x1 + 1 quot#!_A(x1,x2) = x1 + x2 s!_A(x1) = 5 minus!_A(x1,x2) = x1 + 7 |0|!_A() = 0 plus!_A(x1,x2) = x1 + 6 app!_A(x1,x2) = x1 nil!_A() = 0 sum!_A(x1) = 3 cons!_A(x1,x2) = 2 partial status: pi(quot#) = [2] pi(s) = [1] pi(minus) = [1] pi(|0|) = [] pi(plus) = [2] pi(app) = [2] pi(nil) = [] pi(sum) = [] 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: 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: max/plus interpretation on natural numbers: minus#_A(x1,x2) = 0 s_A(x1) = 27 minus_A(x1,x2) = max{25, x1 + 24, x2 + 24} plus_A(x1,x2) = max{x1 + 9, x2 + 23} |0|_A = 1 if_A(x1,x2,x3) = max{x1 - 86, x2 + 56, x3 - 32} true_A = 26 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: minus#_A(x1,x2) = x1 s_A(x1) = x1 + 2 minus_A(x1,x2) = x1 + x2 + 3 plus_A(x1,x2) = x1 + x2 + 6 |0|_A() = 2 if_A(x1,x2,x3) = x2 + 2 true_A() = 3 minus#!_A(x1,x2) = x1 s!_A(x1) = x1 + 2 minus!_A(x1,x2) = x1 + x2 + 5 plus!_A(x1,x2) = x1 + x2 + 8 |0|!_A() = 0 if!_A(x1,x2,x3) = 13 true!_A() = 1 partial status: pi(minus#) = [] pi(s) = [] pi(minus) = [1, 2] pi(plus) = [1, 2] pi(|0|) = [] pi(if) = [2] 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 r4, r5, r6, r8, r9, r10, r11, r12, r14, r16, r17 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: sum#_A(x1) = 4 app_A(x1,x2) = max{5, x1 + 3, x2} cons_A(x1,x2) = 2 sum_A(x1) = 3 quot_A(x1,x2) = max{13, x2 - 32} s_A(x1) = 12 minus_A(x1,x2) = max{0, x1 - 22, x2 - 22} plus_A(x1,x2) = x2 + 12 |0|_A = 11 nil_A = 0 if_A(x1,x2,x3) = max{0, x3 - 22} gt_A(x1,x2) = max{12, x1 - 16, x2 - 16} not_A(x1) = max{13, x1 - 16} id_A(x1) = max{0, x1 - 22} zero_A = 15 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = 0 app_A(x1,x2) = x1 + x2 + 1 cons_A(x1,x2) = x2 + 4 sum_A(x1) = 5 quot_A(x1,x2) = x2 s_A(x1) = 2 minus_A(x1,x2) = x1 + x2 + 3 plus_A(x1,x2) = x1 + x2 + 4 |0|_A() = 3 nil_A() = 1 if_A(x1,x2,x3) = 1 gt_A(x1,x2) = x2 + 1 not_A(x1) = 1 id_A(x1) = x1 + 3 zero_A() = 1 sum#!_A(x1) = x1 app!_A(x1,x2) = x1 + 10 cons!_A(x1,x2) = x1 + 7 sum!_A(x1) = 8 quot!_A(x1,x2) = x1 + 5 s!_A(x1) = 6 minus!_A(x1,x2) = x1 + x2 plus!_A(x1,x2) = x1 + 4 |0|!_A() = 0 nil!_A() = 0 if!_A(x1,x2,x3) = 5 gt!_A(x1,x2) = 6 not!_A(x1) = 6 id!_A(x1) = 6 zero!_A() = 8 partial status: pi(sum#) = [] pi(app) = [2] pi(cons) = [] pi(sum) = [] pi(quot) = [] pi(s) = [] pi(minus) = [] pi(plus) = [2] pi(|0|) = [] pi(nil) = [] pi(if) = [] pi(gt) = [] pi(not) = [] pi(id) = [] pi(zero) = [] 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 r1, r5, r9, r16, r19, r20, r22, r23 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: sum#_A(x1) = x1 + 10 cons_A(x1,x2) = max{8, x2} plus_A(x1,x2) = max{x1 + 80, x2 + 13} minus_A(x1,x2) = max{44, x1 + 24, x2 + 13} |0|_A = 19 app_A(x1,x2) = max{7, x1 + 1, x2 - 1} nil_A = 13 zero_A = 16 if_A(x1,x2,x3) = max{x1 - 142, x2 + 18, x3 + 18} true_A = 108 false_A = 15 gt_A(x1,x2) = max{125, x1 + 61, x2 - 17} s_A(x1) = max{20, x1 - 31} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: sum#_A(x1) = 0 cons_A(x1,x2) = x2 + 2 plus_A(x1,x2) = x2 + 1 minus_A(x1,x2) = x1 + x2 + 6 |0|_A() = 6 app_A(x1,x2) = x1 + x2 + 1 nil_A() = 1 zero_A() = 1 if_A(x1,x2,x3) = x2 + x3 + 1 true_A() = 1 false_A() = 1 gt_A(x1,x2) = 1 s_A(x1) = 5 sum#!_A(x1) = x1 cons!_A(x1,x2) = 3 plus!_A(x1,x2) = x1 + 6 minus!_A(x1,x2) = x1 + x2 + 5 |0|!_A() = 9 app!_A(x1,x2) = x2 + 2 nil!_A() = 0 zero!_A() = 1 if!_A(x1,x2,x3) = 6 true!_A() = 0 false!_A() = 0 gt!_A(x1,x2) = 7 s!_A(x1) = 10 partial status: pi(sum#) = [1] pi(cons) = [2] pi(plus) = [] pi(minus) = [] pi(|0|) = [] pi(app) = [] pi(nil) = [] pi(zero) = [] pi(if) = [2, 3] pi(true) = [] pi(false) = [] pi(gt) = [1] pi(s) = [] 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 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{44, x1 + 18, x2 + 13} s_A(x1) = max{33, x1 + 18} id_A(x1) = max{32, x1 + 6} if_A(x1,x2,x3) = max{25, x2, x3} gt_A(x1,x2) = max{x1 - 18, x2} not_A(x1) = max{51, x1 - 18} true_A = 0 false_A = 0 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: plus#_A(x1,x2) = 0 s_A(x1) = 7 id_A(x1) = x1 + 4 if_A(x1,x2,x3) = x2 + x3 + 8 gt_A(x1,x2) = x1 + 1 not_A(x1) = 1 true_A() = 9 false_A() = 3 plus#!_A(x1,x2) = 10 s!_A(x1) = 11 id!_A(x1) = x1 + 9 if!_A(x1,x2,x3) = 8 gt!_A(x1,x2) = 16 not!_A(x1) = 9 true!_A() = 0 false!_A() = 2 partial status: pi(plus#) = [1] pi(s) = [1] pi(id) = [1] pi(if) = [2, 3] pi(gt) = [2] pi(not) = [] pi(true) = [] pi(false) = [] The following rules are removed: p1, p2, p3, p4 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 r5, r11, r16 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: max/plus interpretation on natural numbers: app#_A(x1,x2) = x2 + 82 cons_A(x1,x2) = max{80, x1 - 77, x2 - 41} plus_A(x1,x2) = max{x1 + 40, x2 + 20} |0|_A = 0 sum_A(x1) = max{197, x1 + 160} nil_A = 1 zero_A = 1 base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): 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 + 1 plus_A(x1,x2) = x2 + 3 |0|_A() = 3 sum_A(x1) = x1 + 4 nil_A() = 3 zero_A() = 1 app#!_A(x1,x2) = x1 + x2 cons!_A(x1,x2) = x1 + x2 + 3 plus!_A(x1,x2) = x2 + 10 |0|!_A() = 2 sum!_A(x1) = 5 nil!_A() = 5 zero!_A() = 3 partial status: pi(app#) = [2] pi(cons) = [] pi(plus) = [1] pi(|0|) = [] pi(sum) = [1] pi(nil) = [] pi(zero) = [] 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: max/plus interpretation on natural numbers: gt#_A(x1,x2) = max{108, x1 + 54, x2 - 108} s_A(x1) = max{107, x1 + 55} base order 2: marked-algebra reduction triple (>=A, >=A!, >A!): matrix interpretation with standard point-wise order: carrier: N^1 order: standard order interpretations: gt#_A(x1,x2) = x1 + x2 s_A(x1) = x1 + 1 gt#!_A(x1,x2) = x1 + x2 s!_A(x1) = 4 partial status: pi(gt#) = [1] pi(s) = [1] The following rules are removed: p1 Then no dependency pair remains.