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, r22, r23 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: quot#_A(x1,x2) = max{0, x2 - 49} s_A(x1) = max{48, x1 + 8} minus_A(x1,x2) = x1 + 68 |0|_A = 11 plus_A(x1,x2) = max{7, x1 - 26} gt_A(x1,x2) = max{92, x1 - 49} zero_A = 9 true_A = 1 false_A = 1 quot#!_A(x1,x2) = 0 s!_A(x1) = 49 minus!_A(x1,x2) = 0 |0|!_A = 51 plus!_A(x1,x2) = max{48, x1 + 42} gt!_A(x1,x2) = max{91, x2 - 49} zero!_A = 50 true!_A = 49 false!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: quot#_A(x1,x2) = x2 + 1 s_A(x1) = x1 + 6 minus_A(x1,x2) = max{5, x1} |0|_A = 11 plus_A(x1,x2) = max{76, x1 - 21, x2 - 23} gt_A(x1,x2) = max{109, x1 - 10} zero_A = 9 true_A = 1 false_A = 1 quot#!_A(x1,x2) = x1 + 6 s!_A(x1) = x1 + 110 minus!_A(x1,x2) = 0 |0|!_A = 117 plus!_A(x1,x2) = max{x1 + 203, x2} gt!_A(x1,x2) = max{x1 - 7, x2 + 210} zero!_A = 111 true!_A = 110 false!_A = 1 partial status: pi(quot#) = [] pi(s) = [1] pi(minus) = [1] pi(|0|) = [] pi(plus) = [2] pi(gt) = [2] 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: 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, r18, r19, r20, r22, r23 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = max{0, x1 - 37} s_A(x1) = max{18, x1} minus_A(x1,x2) = max{x1 + 36, x2 - 37} plus_A(x1,x2) = max{x1 - 9, x2} |0|_A = 32 id_A(x1) = max{10, x1 + 9} if_A(x1,x2,x3) = max{34, x2, x3} true_A = 9 false_A = 1 gt_A(x1,x2) = max{9, x1 - 19, x2 - 19} zero_A = 0 minus#!_A(x1,x2) = max{1, x1 - 37} s!_A(x1) = max{36, x1 - 4} minus!_A(x1,x2) = max{0, x1 - 38} plus!_A(x1,x2) = max{35, x1 + 19, x2 + 1} |0|!_A = 36 id!_A(x1) = max{0, x1 - 14} if!_A(x1,x2,x3) = max{41, x1 - 10, x2 - 11, x3 - 19} true!_A = 0 false!_A = 39 gt!_A(x1,x2) = max{38, x1 - 19, x2 - 19} zero!_A = 40 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = max{0, x1 - 81} s_A(x1) = max{83, x1} minus_A(x1,x2) = max{x1 + 80, x2 - 82} plus_A(x1,x2) = max{81, x1, x2} |0|_A = 83 id_A(x1) = max{80, x1} if_A(x1,x2,x3) = max{82, x1 - 87, x2, x3} true_A = 1 false_A = 1 gt_A(x1,x2) = max{1, x1 - 84, x2 - 84} zero_A = 0 minus#!_A(x1,x2) = max{78, x1 - 1} s!_A(x1) = 0 minus!_A(x1,x2) = max{257, x1 - 84} plus!_A(x1,x2) = max{77, x2 - 85} |0|!_A = 1 id!_A(x1) = max{0, x1 - 174} if!_A(x1,x2,x3) = max{77, x1 - 87, x2 - 86, x3 - 2} true!_A = 0 false!_A = 2 gt!_A(x1,x2) = max{1, x1 - 84, x2 - 84} zero!_A = 3 partial status: pi(minus#) = [] pi(s) = [] pi(minus) = [1, 2] pi(plus) = [] pi(|0|) = [] pi(id) = [1] pi(if) = [1, 2, 3] pi(true) = [] pi(false) = [] pi(gt) = [1, 2] pi(zero) = [] The following rules are removed: p2 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(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: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: minus#(s(x),s(y)) -> minus#(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: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = max{0, x1 - 60, x2 - 60} s_A(x1) = max{63, x1 + 59} minus#!_A(x1,x2) = max{1, x1 - 282, x2 - 283} s!_A(x1) = max{2, x1 - 283} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: minus#_A(x1,x2) = max{0, x1 - 35, x2 - 35} s_A(x1) = max{37, x1 + 34} minus#!_A(x1,x2) = max{4, x1 - 38, x2 - 234} s!_A(x1) = max{3, x1 - 235} partial status: pi(minus#) = [2] pi(s) = [1] 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#(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 r8, r9, r10, r11, r12, r23 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sum#_A(x1) = x1 app_A(x1,x2) = max{x1 + 5, x2} cons_A(x1,x2) = x2 sum_A(x1) = 0 nil_A = 0 plus_A(x1,x2) = 0 gt_A(x1,x2) = max{x1, x2 + 2} zero_A = 0 false_A = 2 sum#!_A(x1) = max{8, x1 - 2} app!_A(x1,x2) = max{x1 + 6, x2 + 7} cons!_A(x1,x2) = 2 sum!_A(x1) = 2 nil!_A = 1 plus!_A(x1,x2) = 15 gt!_A(x1,x2) = max{20, x1 - 8, x2 + 18} zero!_A = 20 false!_A = 19 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sum#_A(x1) = max{6, x1 - 3} app_A(x1,x2) = max{6, x1 + 4, x2} cons_A(x1,x2) = max{9, x2} sum_A(x1) = max{9, x1 - 15} nil_A = 6 plus_A(x1,x2) = max{x1 - 16, x2} gt_A(x1,x2) = 20 zero_A = 0 false_A = 15 sum#!_A(x1) = x1 + 14 app!_A(x1,x2) = max{x1 + 3, x2 - 6} cons!_A(x1,x2) = max{6, x2 + 3} sum!_A(x1) = max{4, x1 + 1} nil!_A = 10 plus!_A(x1,x2) = max{0, x2 - 21} gt!_A(x1,x2) = max{6, x1 - 22, x2 - 22} zero!_A = 2 false!_A = 0 partial status: pi(sum#) = [1] pi(app) = [1, 2] pi(cons) = [] pi(sum) = [] pi(nil) = [] pi(plus) = [] pi(gt) = [] pi(zero) = [] 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 r5, r6, r14, r16, r17, r20 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sum#_A(x1) = 0 cons_A(x1,x2) = max{30, x2 + 6} plus_A(x1,x2) = max{243, x2 + 28} |0|_A = 217 s_A(x1) = 215 if_A(x1,x2,x3) = max{x1 + 79, x3 + 78} gt_A(x1,x2) = max{2, x1 - 1, x2 - 1} not_A(x1) = max{3, x1} id_A(x1) = x1 zero_A = 0 false_A = 3 sum#!_A(x1) = x1 + 16 cons!_A(x1,x2) = max{46, x2 + 44} plus!_A(x1,x2) = max{134, x1 - 162, x2 - 82} |0|!_A = 212 s!_A(x1) = 52 if!_A(x1,x2,x3) = 4 gt!_A(x1,x2) = max{54, x1 - 4, x2 + 1} not!_A(x1) = 3 id!_A(x1) = 1 zero!_A = 3 false!_A = 2 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: sum#_A(x1) = 0 cons_A(x1,x2) = max{32, x2 + 26} plus_A(x1,x2) = max{4, x2 + 1} |0|_A = 3 s_A(x1) = 3 if_A(x1,x2,x3) = max{26, x2 + 4, x3 + 3} gt_A(x1,x2) = max{2, x1 - 4, x2 - 4} not_A(x1) = 26 id_A(x1) = max{14, x1 + 8} zero_A = 0 false_A = 12 sum#!_A(x1) = max{31, x1 - 27} cons!_A(x1,x2) = max{36, x2} plus!_A(x1,x2) = max{4, x2 + 1} |0|!_A = 1 s!_A(x1) = 0 if!_A(x1,x2,x3) = max{x1 + 10, x2 - 11, x3 - 15} gt!_A(x1,x2) = max{6, x1 - 4, x2 - 4} not!_A(x1) = 0 id!_A(x1) = max{5, x1 + 2} zero!_A = 1 false!_A = 0 partial status: pi(sum#) = [] pi(cons) = [2] pi(plus) = [1, 2] pi(|0|) = [] pi(s) = [] pi(if) = [2, 3] pi(gt) = [] pi(not) = [1] pi(id) = [] pi(zero) = [] 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: 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: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 260, x2 - 260} s_A(x1) = max{40, x1 + 37} id_A(x1) = max{154, x1} if_A(x1,x2,x3) = max{125, x1 - 1, x2, x3} gt_A(x1,x2) = max{124, x1 - 41, x2 - 44} not_A(x1) = max{260, x1 - 1} true_A = 124 false_A = 124 zero_A = 0 plus#!_A(x1,x2) = max{71, x1 - 152, x2 - 189} s!_A(x1) = max{0, x1 - 135} id!_A(x1) = max{0, x1 - 263} if!_A(x1,x2,x3) = max{1, x1 - 261, x2 - 305, x3 - 459} gt!_A(x1,x2) = max{1, x1 - 260, x2 - 305} not!_A(x1) = max{5, x1 - 235} true!_A = 0 false!_A = 0 zero!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 32, x2 - 34} s_A(x1) = x1 + 17 id_A(x1) = max{6, x1} if_A(x1,x2,x3) = max{16, x1 - 24, x2, x3} gt_A(x1,x2) = max{1, x1 - 21, x2 - 18} not_A(x1) = max{57, x1 - 19} true_A = 1 false_A = 1 zero_A = 17 plus#!_A(x1,x2) = max{x1 + 79, x2 + 62} s!_A(x1) = x1 + 140 id!_A(x1) = max{58, x1 - 94} if!_A(x1,x2,x3) = max{139, x1 + 137, x2 - 7, x3 - 18} gt!_A(x1,x2) = max{60, x1 - 18} not!_A(x1) = max{141, x1 + 138} true!_A = 59 false!_A = 1 zero!_A = 60 partial status: pi(plus#) = [] pi(s) = [1] pi(id) = [1] pi(if) = [2, 3] pi(gt) = [2] pi(not) = [] pi(true) = [] pi(false) = [] pi(zero) = [] The following rules are removed: p3 -- 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))) p3: 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 estimated dependency graph contains the following SCCs: {p1, p2, p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: plus#(s(x),y) -> plus#(x,y) p2: plus#(s(x),s(y)) -> plus#(if(gt(x,y),x,y),if(not(gt(x,y)),id(x),id(y))) p3: 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 r18, r19, r20, r21, r22, r23, r24 Take the reduction pair: generalized weighted path order (>=MG, >G) base order 1: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 157, x2 - 142} s_A(x1) = x1 + 130 if_A(x1,x2,x3) = max{116, x1 - 3, x2 + 18, x3} gt_A(x1,x2) = max{129, x1 - 131, x2 - 131} not_A(x1) = max{134, x1 - 3} id_A(x1) = max{123, x1} true_A = 1 false_A = 3 zero_A = 0 plus#!_A(x1,x2) = max{2, x1 - 127, x2 - 140} s!_A(x1) = max{10, x1 - 685} if!_A(x1,x2,x3) = max{11, x1 - 550, x2 - 547, x3 - 131} gt!_A(x1,x2) = max{9, x1 - 686, x2 - 686} not!_A(x1) = max{12, x1 - 545} id!_A(x1) = 4 true!_A = 0 false!_A = 0 zero!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 134, x2 - 130} s_A(x1) = x1 + 59 if_A(x1,x2,x3) = max{64, x1 - 1, x2 + 53, x3} gt_A(x1,x2) = max{68, x1 - 60, x2 - 60} not_A(x1) = max{130, x1 - 1} id_A(x1) = max{74, x1} true_A = 68 false_A = 63 zero_A = 0 plus#!_A(x1,x2) = max{x1 + 56, x2 + 63} s!_A(x1) = max{191, x1 - 914} if!_A(x1,x2,x3) = max{193, x1 - 852, x2 - 913, x3 - 1334} gt!_A(x1,x2) = max{131, x1 - 1399, x2 - 1277} not!_A(x1) = max{194, x1 - 851} id!_A(x1) = 192 true!_A = 0 false!_A = 0 zero!_A = 1 partial status: pi(plus#) = [] pi(s) = [1] pi(if) = [1, 2, 3] pi(gt) = [1, 2] pi(not) = [1] pi(id) = [1] pi(true) = [] pi(false) = [] pi(zero) = [] The following rules are removed: p2 -- 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: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 383, x2 - 201} s_A(x1) = max{113, x1 + 32} id_A(x1) = max{179, x1 + 154} if_A(x1,x2,x3) = max{200, x1 - 1, x2 + 14, x3} gt_A(x1,x2) = max{153, x1 - 114, x2 - 38} true_A = 153 false_A = 153 zero_A = 0 plus#!_A(x1,x2) = max{202, x2 + 1} s!_A(x1) = max{3, x1 - 199} id!_A(x1) = max{1, x1 - 583} if!_A(x1,x2,x3) = max{2, x1 - 162, x2 - 491, x3 - 457} gt!_A(x1,x2) = max{4, x1 - 391, x2 - 114} true!_A = 0 false!_A = 0 zero!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 100, x2 - 59} s_A(x1) = max{13, x1} id_A(x1) = max{38, x1 + 34} if_A(x1,x2,x3) = max{58, x1 - 1, x2, x3} gt_A(x1,x2) = max{1, x1 - 14, x2 - 26} true_A = 1 false_A = 1 zero_A = 0 plus#!_A(x1,x2) = 0 s!_A(x1) = max{0, x1 - 40} id!_A(x1) = max{2, x1 - 63} if!_A(x1,x2,x3) = max{3, x1 - 14, x2 - 39, x3 - 39} gt!_A(x1,x2) = max{1, x1 - 39, x2 - 14} true!_A = 0 false!_A = 0 zero!_A = 1 partial status: pi(plus#) = [1] pi(s) = [1] pi(id) = [1] pi(if) = [1, 2, 3] pi(gt) = [] pi(true) = [] pi(false) = [] pi(zero) = [] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: 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: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 126, x2 - 63} id_A(x1) = max{60, x1 + 32} s_A(x1) = max{59, x1 + 33} if_A(x1,x2,x3) = max{60, x1 - 1, x2 + 33, x3} gt_A(x1,x2) = max{63, x1 - 60, x2 - 34} true_A = 60 false_A = 0 zero_A = 0 plus#!_A(x1,x2) = max{1, x1 - 63, x2 - 453} id!_A(x1) = max{3, x1 - 390} s!_A(x1) = max{4, x1 - 165} if!_A(x1,x2,x3) = max{2, x1 - 95, x2 - 131, x3 - 61} gt!_A(x1,x2) = max{5, x1 - 61, x2 - 419} true!_A = 0 false!_A = 0 zero!_A = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: plus#_A(x1,x2) = max{0, x1 - 161, x2 - 115} id_A(x1) = max{39, x1 + 20} s_A(x1) = max{66, x1 + 41} if_A(x1,x2,x3) = max{114, x1 - 5, x2 + 26, x3} gt_A(x1,x2) = max{73, x1 - 67, x2 - 67} true_A = 73 false_A = 73 zero_A = 0 plus#!_A(x1,x2) = max{6, x1 - 40, x2 - 373} id!_A(x1) = max{2, x1 - 356} s!_A(x1) = max{3, x1 - 304} if!_A(x1,x2,x3) = max{5, x1 - 94, x2 - 280, x3 - 308} gt!_A(x1,x2) = max{1, x1 - 373, x2 - 260} true!_A = 0 false!_A = 0 zero!_A = 1 partial status: pi(plus#) = [1] pi(id) = [1] pi(s) = [] pi(if) = [1, 2, 3] pi(gt) = [] pi(true) = [] pi(false) = [] 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: 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: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 20} cons_A(x1,x2) = max{x1 - 77, x2 + 19} app#!_A(x1,x2) = max{4, x1 - 2970, x2 - 1} cons!_A(x1,x2) = max{3, x1 - 4149, x2 - 2971} 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: app#_A(x1,x2) = max{0, x1 - 6} cons_A(x1,x2) = max{x1 - 12, x2 + 5} app#!_A(x1,x2) = max{1, x1 - 6, x2 - 1} cons!_A(x1,x2) = max{2, x1 - 1367, x2 - 1350} partial status: pi(app#) = [1] 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: trivial reduction triple (T x T, T x T, Φ) base order 2: lexicographic combination of reduction triples: 1. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: gt#_A(x1,x2) = max{0, x1 - 20, x2 - 20} s_A(x1) = x1 + 19 gt#!_A(x1,x2) = max{2, x1 + 1, x2 - 20} s!_A(x1) = 1 2. marked-algebra reduction triple (>=A, >=A!, >A!): max/plus interpretation on natural numbers: gt#_A(x1,x2) = max{0, x1 - 24, x2 - 24} s_A(x1) = max{42, x1 + 23} gt#!_A(x1,x2) = max{107, x1 - 43, x2 - 43} s!_A(x1) = x1 + 106 partial status: pi(gt#) = [] pi(s) = [] The following rules are removed: p1 Then no dependency pair remains.