YES We show the termination of the TRS R: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) active(sqr(|0|())) -> mark(|0|()) active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) active(dbl(|0|())) -> mark(|0|()) active(dbl(s(X))) -> mark(s(s(dbl(X)))) active(add(|0|(),X)) -> mark(X) active(add(s(X),Y)) -> mark(s(add(X,Y))) active(first(|0|(),X)) -> mark(nil()) active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) active(terms(X)) -> terms(active(X)) active(cons(X1,X2)) -> cons(active(X1),X2) active(recip(X)) -> recip(active(X)) active(sqr(X)) -> sqr(active(X)) active(add(X1,X2)) -> add(active(X1),X2) active(add(X1,X2)) -> add(X1,active(X2)) active(dbl(X)) -> dbl(active(X)) active(first(X1,X2)) -> first(active(X1),X2) active(first(X1,X2)) -> first(X1,active(X2)) terms(mark(X)) -> mark(terms(X)) cons(mark(X1),X2) -> mark(cons(X1,X2)) recip(mark(X)) -> mark(recip(X)) sqr(mark(X)) -> mark(sqr(X)) add(mark(X1),X2) -> mark(add(X1,X2)) add(X1,mark(X2)) -> mark(add(X1,X2)) dbl(mark(X)) -> mark(dbl(X)) first(mark(X1),X2) -> mark(first(X1,X2)) first(X1,mark(X2)) -> mark(first(X1,X2)) proper(terms(X)) -> terms(proper(X)) proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) proper(recip(X)) -> recip(proper(X)) proper(sqr(X)) -> sqr(proper(X)) proper(s(X)) -> s(proper(X)) proper(|0|()) -> ok(|0|()) proper(add(X1,X2)) -> add(proper(X1),proper(X2)) proper(dbl(X)) -> dbl(proper(X)) proper(first(X1,X2)) -> first(proper(X1),proper(X2)) proper(nil()) -> ok(nil()) terms(ok(X)) -> ok(terms(X)) cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) recip(ok(X)) -> ok(recip(X)) sqr(ok(X)) -> ok(sqr(X)) s(ok(X)) -> ok(s(X)) add(ok(X1),ok(X2)) -> ok(add(X1,X2)) dbl(ok(X)) -> ok(dbl(X)) first(ok(X1),ok(X2)) -> ok(first(X1,X2)) top(mark(X)) -> top(proper(X)) top(ok(X)) -> top(active(X)) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: active#(terms(N)) -> cons#(recip(sqr(N)),terms(s(N))) p2: active#(terms(N)) -> recip#(sqr(N)) p3: active#(terms(N)) -> sqr#(N) p4: active#(terms(N)) -> terms#(s(N)) p5: active#(terms(N)) -> s#(N) p6: active#(sqr(s(X))) -> s#(add(sqr(X),dbl(X))) p7: active#(sqr(s(X))) -> add#(sqr(X),dbl(X)) p8: active#(sqr(s(X))) -> sqr#(X) p9: active#(sqr(s(X))) -> dbl#(X) p10: active#(dbl(s(X))) -> s#(s(dbl(X))) p11: active#(dbl(s(X))) -> s#(dbl(X)) p12: active#(dbl(s(X))) -> dbl#(X) p13: active#(add(s(X),Y)) -> s#(add(X,Y)) p14: active#(add(s(X),Y)) -> add#(X,Y) p15: active#(first(s(X),cons(Y,Z))) -> cons#(Y,first(X,Z)) p16: active#(first(s(X),cons(Y,Z))) -> first#(X,Z) p17: active#(terms(X)) -> terms#(active(X)) p18: active#(terms(X)) -> active#(X) p19: active#(cons(X1,X2)) -> cons#(active(X1),X2) p20: active#(cons(X1,X2)) -> active#(X1) p21: active#(recip(X)) -> recip#(active(X)) p22: active#(recip(X)) -> active#(X) p23: active#(sqr(X)) -> sqr#(active(X)) p24: active#(sqr(X)) -> active#(X) p25: active#(add(X1,X2)) -> add#(active(X1),X2) p26: active#(add(X1,X2)) -> active#(X1) p27: active#(add(X1,X2)) -> add#(X1,active(X2)) p28: active#(add(X1,X2)) -> active#(X2) p29: active#(dbl(X)) -> dbl#(active(X)) p30: active#(dbl(X)) -> active#(X) p31: active#(first(X1,X2)) -> first#(active(X1),X2) p32: active#(first(X1,X2)) -> active#(X1) p33: active#(first(X1,X2)) -> first#(X1,active(X2)) p34: active#(first(X1,X2)) -> active#(X2) p35: terms#(mark(X)) -> terms#(X) p36: cons#(mark(X1),X2) -> cons#(X1,X2) p37: recip#(mark(X)) -> recip#(X) p38: sqr#(mark(X)) -> sqr#(X) p39: add#(mark(X1),X2) -> add#(X1,X2) p40: add#(X1,mark(X2)) -> add#(X1,X2) p41: dbl#(mark(X)) -> dbl#(X) p42: first#(mark(X1),X2) -> first#(X1,X2) p43: first#(X1,mark(X2)) -> first#(X1,X2) p44: proper#(terms(X)) -> terms#(proper(X)) p45: proper#(terms(X)) -> proper#(X) p46: proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2)) p47: proper#(cons(X1,X2)) -> proper#(X1) p48: proper#(cons(X1,X2)) -> proper#(X2) p49: proper#(recip(X)) -> recip#(proper(X)) p50: proper#(recip(X)) -> proper#(X) p51: proper#(sqr(X)) -> sqr#(proper(X)) p52: proper#(sqr(X)) -> proper#(X) p53: proper#(s(X)) -> s#(proper(X)) p54: proper#(s(X)) -> proper#(X) p55: proper#(add(X1,X2)) -> add#(proper(X1),proper(X2)) p56: proper#(add(X1,X2)) -> proper#(X1) p57: proper#(add(X1,X2)) -> proper#(X2) p58: proper#(dbl(X)) -> dbl#(proper(X)) p59: proper#(dbl(X)) -> proper#(X) p60: proper#(first(X1,X2)) -> first#(proper(X1),proper(X2)) p61: proper#(first(X1,X2)) -> proper#(X1) p62: proper#(first(X1,X2)) -> proper#(X2) p63: terms#(ok(X)) -> terms#(X) p64: cons#(ok(X1),ok(X2)) -> cons#(X1,X2) p65: recip#(ok(X)) -> recip#(X) p66: sqr#(ok(X)) -> sqr#(X) p67: s#(ok(X)) -> s#(X) p68: add#(ok(X1),ok(X2)) -> add#(X1,X2) p69: dbl#(ok(X)) -> dbl#(X) p70: first#(ok(X1),ok(X2)) -> first#(X1,X2) p71: top#(mark(X)) -> top#(proper(X)) p72: top#(mark(X)) -> proper#(X) p73: top#(ok(X)) -> top#(active(X)) p74: top#(ok(X)) -> active#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p71, p73} {p18, p20, p22, p24, p26, p28, p30, p32, p34} {p45, p47, p48, p50, p52, p54, p56, p57, p59, p61, p62} {p36, p64} {p37, p65} {p38, p66} {p35, p63} {p67} {p39, p40, p68} {p41, p69} {p42, p43, p70} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) p2: top#(mark(X)) -> top#(proper(X)) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31, r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42, r43, r44, r45 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: top#_A(x1) = ((0,0),(1,0)) x1 + (0,1) ok_A(x1) = ((1,0),(0,0)) x1 + (0,38) active_A(x1) = ((1,0),(1,1)) x1 + (0,2) mark_A(x1) = ((1,0),(0,0)) x1 + (4,79) proper_A(x1) = ((1,0),(1,1)) x1 + (0,12) terms_A(x1) = ((1,0),(0,0)) x1 + (11,82) cons_A(x1,x2) = ((1,0),(1,0)) x1 + (1,78) recip_A(x1) = ((1,0),(1,0)) x1 + (0,76) sqr_A(x1) = ((1,0),(1,1)) x1 + (5,0) add_A(x1,x2) = x1 + ((1,0),(1,1)) x2 + (13,12) dbl_A(x1) = x1 + (14,11) first_A(x1,x2) = ((1,0),(0,0)) x1 + ((1,0),(1,0)) x2 + (15,80) s_A(x1) = (14,38) |0|_A() = (1,69) nil_A() = (2,69) precedence: sqr > add > proper > active > first > dbl > recip > terms > top# = mark = s = |0| > cons > nil > ok partial status: pi(top#) = [] pi(ok) = [] pi(active) = [1] pi(mark) = [] pi(proper) = [1] pi(terms) = [] pi(cons) = [] pi(recip) = [] pi(sqr) = [] pi(add) = [1, 2] pi(dbl) = [1] pi(first) = [] pi(s) = [] pi(|0|) = [] pi(nil) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: top#_A(x1) = (0,10) ok_A(x1) = (5,6) active_A(x1) = ((0,0),(1,0)) x1 + (4,9) mark_A(x1) = (2,3) proper_A(x1) = (7,2) terms_A(x1) = (1,4) cons_A(x1,x2) = (0,2) recip_A(x1) = (3,5) sqr_A(x1) = (8,8) add_A(x1,x2) = (3,1) dbl_A(x1) = (7,1) first_A(x1,x2) = (3,2) s_A(x1) = (6,7) |0|_A() = (6,0) nil_A() = (0,0) precedence: |0| > proper = nil > sqr = dbl = s > ok = recip > active > top# > first > mark = add > terms > cons partial status: pi(top#) = [] pi(ok) = [] pi(active) = [] pi(mark) = [] pi(proper) = [] pi(terms) = [] pi(cons) = [] pi(recip) = [] pi(sqr) = [] pi(add) = [] pi(dbl) = [] pi(first) = [] pi(s) = [] pi(|0|) = [] pi(nil) = [] The next rules are strictly ordered: p2 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: top#(ok(X)) -> top#(active(X)) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16, r17, r18, r19, r20, r21, r22, r23, r24, r25, r26, r27, r38, r39, r40, r41, r42, r43, r44, r45 Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = x1 + 138 ok_A(x1) = max{136, x1 + 83} active_A(x1) = x1 terms_A(x1) = x1 + 51 mark_A(x1) = 51 cons_A(x1,x2) = max{x1 - 169, x2 + 67} recip_A(x1) = x1 + 82 sqr_A(x1) = x1 + 137 add_A(x1,x2) = x1 + 51 dbl_A(x1) = x1 + 51 first_A(x1,x2) = max{x1 + 54, x2 + 54} s_A(x1) = x1 + 39 |0|_A = 0 nil_A = 0 precedence: active = terms = mark = cons = recip = sqr = add = dbl = first = s > top# = ok = |0| > nil partial status: pi(top#) = [1] pi(ok) = [1] pi(active) = [1] pi(terms) = [1] pi(mark) = [] pi(cons) = [2] pi(recip) = [1] pi(sqr) = [1] pi(add) = [1] pi(dbl) = [1] pi(first) = [1, 2] pi(s) = [] pi(|0|) = [] pi(nil) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: top#_A(x1) = max{405, x1 + 152} ok_A(x1) = max{404, x1 + 255} active_A(x1) = max{406, x1 + 195} terms_A(x1) = x1 + 38 mark_A(x1) = 686 cons_A(x1,x2) = x2 + 164 recip_A(x1) = max{232, x1 + 128} sqr_A(x1) = max{297, x1 + 106} add_A(x1,x2) = max{109, x1 + 3} dbl_A(x1) = max{403, x1 + 194} first_A(x1,x2) = max{38, x1 - 256, x2 + 19} s_A(x1) = 296 |0|_A = 17 nil_A = 18 precedence: top# = ok = active = terms = mark = cons = recip = sqr = add = dbl = first = s = |0| = nil partial status: pi(top#) = [] pi(ok) = [1] pi(active) = [] pi(terms) = [1] pi(mark) = [] pi(cons) = [2] pi(recip) = [1] pi(sqr) = [1] pi(add) = [1] pi(dbl) = [1] pi(first) = [2] pi(s) = [] pi(|0|) = [] pi(nil) = [] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: active#(first(X1,X2)) -> active#(X2) p2: active#(first(X1,X2)) -> active#(X1) p3: active#(dbl(X)) -> active#(X) p4: active#(add(X1,X2)) -> active#(X2) p5: active#(add(X1,X2)) -> active#(X1) p6: active#(sqr(X)) -> active#(X) p7: active#(recip(X)) -> active#(X) p8: active#(cons(X1,X2)) -> active#(X1) p9: active#(terms(X)) -> active#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = x1 + 4 first_A(x1,x2) = max{x1 + 2, x2 + 1} dbl_A(x1) = x1 + 2 add_A(x1,x2) = max{x1 + 4, x2 + 3} sqr_A(x1) = x1 + 2 recip_A(x1) = x1 + 4 cons_A(x1,x2) = max{x1 + 1, x2 - 1} terms_A(x1) = x1 + 5 precedence: active# = first = dbl = add = sqr = recip = cons = terms partial status: pi(active#) = [] pi(first) = [] pi(dbl) = [] pi(add) = [] pi(sqr) = [] pi(recip) = [] pi(cons) = [] pi(terms) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: active#_A(x1) = 1 first_A(x1,x2) = 0 dbl_A(x1) = x1 add_A(x1,x2) = 0 sqr_A(x1) = x1 recip_A(x1) = x1 cons_A(x1,x2) = 0 terms_A(x1) = x1 precedence: active# = first = dbl = add = sqr = recip = cons = terms partial status: pi(active#) = [] pi(first) = [] pi(dbl) = [1] pi(add) = [] pi(sqr) = [1] pi(recip) = [1] pi(cons) = [] pi(terms) = [1] The next rules are strictly ordered: p1, p2, p3, p4, p5, p6, p7, p8, p9 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: proper#(first(X1,X2)) -> proper#(X2) p2: proper#(first(X1,X2)) -> proper#(X1) p3: proper#(dbl(X)) -> proper#(X) p4: proper#(add(X1,X2)) -> proper#(X2) p5: proper#(add(X1,X2)) -> proper#(X1) p6: proper#(s(X)) -> proper#(X) p7: proper#(sqr(X)) -> proper#(X) p8: proper#(recip(X)) -> proper#(X) p9: proper#(cons(X1,X2)) -> proper#(X2) p10: proper#(cons(X1,X2)) -> proper#(X1) p11: proper#(terms(X)) -> proper#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = max{2, x1 + 1} first_A(x1,x2) = max{x1, x2} dbl_A(x1) = max{1, x1} add_A(x1,x2) = max{x1, x2} s_A(x1) = max{1, x1} sqr_A(x1) = max{1, x1} recip_A(x1) = max{1, x1} cons_A(x1,x2) = max{x1, x2} terms_A(x1) = max{1, x1} precedence: proper# = first = dbl = add = s = sqr = recip = cons = terms partial status: pi(proper#) = [1] pi(first) = [1, 2] pi(dbl) = [1] pi(add) = [1, 2] pi(s) = [1] pi(sqr) = [1] pi(recip) = [1] pi(cons) = [1, 2] pi(terms) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: proper#_A(x1) = x1 + 1 first_A(x1,x2) = max{x1, x2} dbl_A(x1) = x1 add_A(x1,x2) = max{x1, x2} s_A(x1) = x1 sqr_A(x1) = x1 recip_A(x1) = x1 cons_A(x1,x2) = max{x1, x2} terms_A(x1) = x1 precedence: proper# = first = dbl = add = s = sqr = recip = cons = terms partial status: pi(proper#) = [1] pi(first) = [1, 2] pi(dbl) = [1] pi(add) = [1, 2] pi(s) = [1] pi(sqr) = [1] pi(recip) = [1] pi(cons) = [1, 2] pi(terms) = [1] The next rules are strictly ordered: p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: cons#(mark(X1),X2) -> cons#(X1,X2) p2: cons#(ok(X1),ok(X2)) -> cons#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: cons#_A(x1,x2) = max{2, x1 + 1, x2 + 1} mark_A(x1) = max{1, x1} ok_A(x1) = max{1, x1} precedence: cons# = mark = ok partial status: pi(cons#) = [1, 2] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: cons#_A(x1,x2) = max{x1 + 1, x2 - 2} mark_A(x1) = x1 ok_A(x1) = max{4, x1 + 1} precedence: cons# = mark = ok partial status: pi(cons#) = [1] pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: recip#(mark(X)) -> recip#(X) p2: recip#(ok(X)) -> recip#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: recip#_A(x1) = max{6, x1 + 4} mark_A(x1) = max{4, x1 + 3} ok_A(x1) = max{2, x1 + 1} precedence: recip# = mark = ok partial status: pi(recip#) = [1] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: recip#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: recip# = mark = ok partial status: pi(recip#) = [1] pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: sqr#(mark(X)) -> sqr#(X) p2: sqr#(ok(X)) -> sqr#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: sqr#_A(x1) = max{6, x1 + 4} mark_A(x1) = max{4, x1 + 3} ok_A(x1) = max{2, x1 + 1} precedence: sqr# = mark = ok partial status: pi(sqr#) = [1] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: sqr#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: sqr# = mark = ok partial status: pi(sqr#) = [1] pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: terms#(mark(X)) -> terms#(X) p2: terms#(ok(X)) -> terms#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: terms#_A(x1) = max{6, x1 + 4} mark_A(x1) = max{4, x1 + 3} ok_A(x1) = max{2, x1 + 1} precedence: terms# = mark = ok partial status: pi(terms#) = [1] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: terms#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: terms# = mark = ok partial status: pi(terms#) = [1] pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: s#(ok(X)) -> s#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: s#_A(x1) = max{2, x1 + 1} ok_A(x1) = max{1, x1} precedence: s# = ok partial status: pi(s#) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: s#_A(x1) = x1 + 2 ok_A(x1) = x1 + 1 precedence: s# = ok partial status: pi(s#) = [1] pi(ok) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: add#(mark(X1),X2) -> add#(X1,X2) p2: add#(ok(X1),ok(X2)) -> add#(X1,X2) p3: add#(X1,mark(X2)) -> add#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: add#_A(x1,x2) = max{2, x1} mark_A(x1) = max{2, x1 + 1} ok_A(x1) = max{7, x1 + 3} precedence: add# = ok > mark partial status: pi(add#) = [1] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: add#_A(x1,x2) = 0 mark_A(x1) = x1 + 1 ok_A(x1) = max{3, x1 + 1} precedence: add# = ok > mark partial status: pi(add#) = [] pi(mark) = [1] pi(ok) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: add#(ok(X1),ok(X2)) -> add#(X1,X2) p2: add#(X1,mark(X2)) -> add#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: add#(ok(X1),ok(X2)) -> add#(X1,X2) p2: add#(X1,mark(X2)) -> add#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: add#_A(x1,x2) = x2 + 1 ok_A(x1) = x1 + 2 mark_A(x1) = x1 + 1 precedence: add# = ok = mark partial status: pi(add#) = [] pi(ok) = [] pi(mark) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: add#_A(x1,x2) = 0 ok_A(x1) = max{2, x1} mark_A(x1) = x1 precedence: add# = ok = mark partial status: pi(add#) = [] pi(ok) = [1] pi(mark) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: dbl#(mark(X)) -> dbl#(X) p2: dbl#(ok(X)) -> dbl#(X) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the monotone reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: dbl#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: dbl# = mark = ok partial status: pi(dbl#) = [] pi(mark) = [] pi(ok) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: dbl#_A(x1) = x1 + 1 mark_A(x1) = x1 ok_A(x1) = x1 precedence: dbl# = mark = ok partial status: pi(dbl#) = [1] pi(mark) = [1] pi(ok) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains. -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: first#(mark(X1),X2) -> first#(X1,X2) p2: first#(ok(X1),ok(X2)) -> first#(X1,X2) p3: first#(X1,mark(X2)) -> first#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: first#_A(x1,x2) = max{2, x1} mark_A(x1) = max{2, x1 + 1} ok_A(x1) = max{7, x1 + 3} precedence: first# = ok > mark partial status: pi(first#) = [1] pi(mark) = [1] pi(ok) = [1] 2. weighted path order base order: max/plus interpretations on natural numbers: first#_A(x1,x2) = 0 mark_A(x1) = x1 + 1 ok_A(x1) = max{3, x1 + 1} precedence: first# = ok > mark partial status: pi(first#) = [] pi(mark) = [1] pi(ok) = [] The next rules are strictly ordered: p1 We remove them from the problem. -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: first#(ok(X1),ok(X2)) -> first#(X1,X2) p2: first#(X1,mark(X2)) -> first#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The estimated dependency graph contains the following SCCs: {p1, p2} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: first#(ok(X1),ok(X2)) -> first#(X1,X2) p2: first#(X1,mark(X2)) -> first#(X1,X2) and R consists of: r1: active(terms(N)) -> mark(cons(recip(sqr(N)),terms(s(N)))) r2: active(sqr(|0|())) -> mark(|0|()) r3: active(sqr(s(X))) -> mark(s(add(sqr(X),dbl(X)))) r4: active(dbl(|0|())) -> mark(|0|()) r5: active(dbl(s(X))) -> mark(s(s(dbl(X)))) r6: active(add(|0|(),X)) -> mark(X) r7: active(add(s(X),Y)) -> mark(s(add(X,Y))) r8: active(first(|0|(),X)) -> mark(nil()) r9: active(first(s(X),cons(Y,Z))) -> mark(cons(Y,first(X,Z))) r10: active(terms(X)) -> terms(active(X)) r11: active(cons(X1,X2)) -> cons(active(X1),X2) r12: active(recip(X)) -> recip(active(X)) r13: active(sqr(X)) -> sqr(active(X)) r14: active(add(X1,X2)) -> add(active(X1),X2) r15: active(add(X1,X2)) -> add(X1,active(X2)) r16: active(dbl(X)) -> dbl(active(X)) r17: active(first(X1,X2)) -> first(active(X1),X2) r18: active(first(X1,X2)) -> first(X1,active(X2)) r19: terms(mark(X)) -> mark(terms(X)) r20: cons(mark(X1),X2) -> mark(cons(X1,X2)) r21: recip(mark(X)) -> mark(recip(X)) r22: sqr(mark(X)) -> mark(sqr(X)) r23: add(mark(X1),X2) -> mark(add(X1,X2)) r24: add(X1,mark(X2)) -> mark(add(X1,X2)) r25: dbl(mark(X)) -> mark(dbl(X)) r26: first(mark(X1),X2) -> mark(first(X1,X2)) r27: first(X1,mark(X2)) -> mark(first(X1,X2)) r28: proper(terms(X)) -> terms(proper(X)) r29: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2)) r30: proper(recip(X)) -> recip(proper(X)) r31: proper(sqr(X)) -> sqr(proper(X)) r32: proper(s(X)) -> s(proper(X)) r33: proper(|0|()) -> ok(|0|()) r34: proper(add(X1,X2)) -> add(proper(X1),proper(X2)) r35: proper(dbl(X)) -> dbl(proper(X)) r36: proper(first(X1,X2)) -> first(proper(X1),proper(X2)) r37: proper(nil()) -> ok(nil()) r38: terms(ok(X)) -> ok(terms(X)) r39: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2)) r40: recip(ok(X)) -> ok(recip(X)) r41: sqr(ok(X)) -> ok(sqr(X)) r42: s(ok(X)) -> ok(s(X)) r43: add(ok(X1),ok(X2)) -> ok(add(X1,X2)) r44: dbl(ok(X)) -> ok(dbl(X)) r45: first(ok(X1),ok(X2)) -> ok(first(X1,X2)) r46: top(mark(X)) -> top(proper(X)) r47: top(ok(X)) -> top(active(X)) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. weighted path order base order: max/plus interpretations on natural numbers: first#_A(x1,x2) = x2 + 1 ok_A(x1) = x1 + 2 mark_A(x1) = x1 + 1 precedence: first# = ok = mark partial status: pi(first#) = [] pi(ok) = [] pi(mark) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: first#_A(x1,x2) = 0 ok_A(x1) = max{2, x1} mark_A(x1) = x1 precedence: first# = ok = mark partial status: pi(first#) = [] pi(ok) = [1] pi(mark) = [1] The next rules are strictly ordered: p1, p2 We remove them from the problem. Then no dependency pair remains.