YES

We show the termination of the TRS R:

  active(fst(|0|(),Z)) -> mark(nil())
  active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
  active(from(X)) -> mark(cons(X,from(s(X))))
  active(add(|0|(),X)) -> mark(X)
  active(add(s(X),Y)) -> mark(s(add(X,Y)))
  active(len(nil())) -> mark(|0|())
  active(len(cons(X,Z))) -> mark(s(len(Z)))
  active(cons(X1,X2)) -> cons(active(X1),X2)
  active(fst(X1,X2)) -> fst(active(X1),X2)
  active(fst(X1,X2)) -> fst(X1,active(X2))
  active(from(X)) -> from(active(X))
  active(add(X1,X2)) -> add(active(X1),X2)
  active(add(X1,X2)) -> add(X1,active(X2))
  active(len(X)) -> len(active(X))
  cons(mark(X1),X2) -> mark(cons(X1,X2))
  fst(mark(X1),X2) -> mark(fst(X1,X2))
  fst(X1,mark(X2)) -> mark(fst(X1,X2))
  from(mark(X)) -> mark(from(X))
  add(mark(X1),X2) -> mark(add(X1,X2))
  add(X1,mark(X2)) -> mark(add(X1,X2))
  len(mark(X)) -> mark(len(X))
  proper(|0|()) -> ok(|0|())
  proper(s(X)) -> s(proper(X))
  proper(nil()) -> ok(nil())
  proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
  proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
  proper(from(X)) -> from(proper(X))
  proper(add(X1,X2)) -> add(proper(X1),proper(X2))
  proper(len(X)) -> len(proper(X))
  s(ok(X)) -> ok(s(X))
  cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
  fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
  from(ok(X)) -> ok(from(X))
  add(ok(X1),ok(X2)) -> ok(add(X1,X2))
  len(ok(X)) -> ok(len(X))
  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#(fst(s(X),cons(Y,Z))) -> cons#(Y,fst(X,Z))
p2: active#(fst(s(X),cons(Y,Z))) -> fst#(X,Z)
p3: active#(from(X)) -> cons#(X,from(s(X)))
p4: active#(from(X)) -> from#(s(X))
p5: active#(from(X)) -> s#(X)
p6: active#(add(s(X),Y)) -> s#(add(X,Y))
p7: active#(add(s(X),Y)) -> add#(X,Y)
p8: active#(len(cons(X,Z))) -> s#(len(Z))
p9: active#(len(cons(X,Z))) -> len#(Z)
p10: active#(cons(X1,X2)) -> cons#(active(X1),X2)
p11: active#(cons(X1,X2)) -> active#(X1)
p12: active#(fst(X1,X2)) -> fst#(active(X1),X2)
p13: active#(fst(X1,X2)) -> active#(X1)
p14: active#(fst(X1,X2)) -> fst#(X1,active(X2))
p15: active#(fst(X1,X2)) -> active#(X2)
p16: active#(from(X)) -> from#(active(X))
p17: active#(from(X)) -> active#(X)
p18: active#(add(X1,X2)) -> add#(active(X1),X2)
p19: active#(add(X1,X2)) -> active#(X1)
p20: active#(add(X1,X2)) -> add#(X1,active(X2))
p21: active#(add(X1,X2)) -> active#(X2)
p22: active#(len(X)) -> len#(active(X))
p23: active#(len(X)) -> active#(X)
p24: cons#(mark(X1),X2) -> cons#(X1,X2)
p25: fst#(mark(X1),X2) -> fst#(X1,X2)
p26: fst#(X1,mark(X2)) -> fst#(X1,X2)
p27: from#(mark(X)) -> from#(X)
p28: add#(mark(X1),X2) -> add#(X1,X2)
p29: add#(X1,mark(X2)) -> add#(X1,X2)
p30: len#(mark(X)) -> len#(X)
p31: proper#(s(X)) -> s#(proper(X))
p32: proper#(s(X)) -> proper#(X)
p33: proper#(cons(X1,X2)) -> cons#(proper(X1),proper(X2))
p34: proper#(cons(X1,X2)) -> proper#(X1)
p35: proper#(cons(X1,X2)) -> proper#(X2)
p36: proper#(fst(X1,X2)) -> fst#(proper(X1),proper(X2))
p37: proper#(fst(X1,X2)) -> proper#(X1)
p38: proper#(fst(X1,X2)) -> proper#(X2)
p39: proper#(from(X)) -> from#(proper(X))
p40: proper#(from(X)) -> proper#(X)
p41: proper#(add(X1,X2)) -> add#(proper(X1),proper(X2))
p42: proper#(add(X1,X2)) -> proper#(X1)
p43: proper#(add(X1,X2)) -> proper#(X2)
p44: proper#(len(X)) -> len#(proper(X))
p45: proper#(len(X)) -> proper#(X)
p46: s#(ok(X)) -> s#(X)
p47: cons#(ok(X1),ok(X2)) -> cons#(X1,X2)
p48: fst#(ok(X1),ok(X2)) -> fst#(X1,X2)
p49: from#(ok(X)) -> from#(X)
p50: add#(ok(X1),ok(X2)) -> add#(X1,X2)
p51: len#(ok(X)) -> len#(X)
p52: top#(mark(X)) -> top#(proper(X))
p53: top#(mark(X)) -> proper#(X)
p54: top#(ok(X)) -> top#(active(X))
p55: top#(ok(X)) -> active#(X)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: top(ok(X)) -> top(active(X))

The estimated dependency graph contains the following SCCs:

  {p52, p54}
  {p11, p13, p15, p17, p19, p21, p23}
  {p32, p34, p35, p37, p38, p40, p42, p43, p45}
  {p24, p47}
  {p25, p26, p48}
  {p27, p49}
  {p46}
  {p28, p29, p50}
  {p30, p51}


-- 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(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        top#_A(x1) = x1
        ok_A(x1) = x1
        active_A(x1) = x1
        mark_A(x1) = x1 + 1
        proper_A(x1) = x1
        cons_A(x1,x2) = x1 + 1
        fst_A(x1,x2) = x1 + x2 + 2
        from_A(x1) = x1 + 3
        add_A(x1,x2) = x1 + x2 + 2
        len_A(x1) = x1 + 2
        s_A(x1) = 1
        |0|_A() = 1
        nil_A() = 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        nil > |0| > proper > fst > s > len > add > cons > mark > top# > ok > from > active
      
      argument filter:
    
        pi(top#) = []
        pi(ok) = []
        pi(active) = 1
        pi(mark) = []
        pi(proper) = []
        pi(cons) = []
        pi(fst) = []
        pi(from) = 1
        pi(add) = []
        pi(len) = []
        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(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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, r30, r31, r32, r33, r34, r35

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        top#_A(x1) = x1
        ok_A(x1) = x1 + 2
        active_A(x1) = x1 + 1
        cons_A(x1,x2) = x1 + x2 + 1
        mark_A(x1) = 1
        fst_A(x1,x2) = x1 + x2 + 1
        from_A(x1) = x1 + 1
        add_A(x1,x2) = x1 + x2 + 1
        len_A(x1) = x1 + 1
        s_A(x1) = x1 + 1
        |0|_A() = 1
        nil_A() = 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        mark > nil > |0| > active > fst > s > len > add > cons > from > top# > ok
      
      argument filter:
    
        pi(top#) = [1]
        pi(ok) = [1]
        pi(active) = [1]
        pi(cons) = 1
        pi(mark) = []
        pi(fst) = [1, 2]
        pi(from) = [1]
        pi(add) = []
        pi(len) = [1]
        pi(s) = 1
        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#(len(X)) -> active#(X)
p2: active#(add(X1,X2)) -> active#(X2)
p3: active#(add(X1,X2)) -> active#(X1)
p4: active#(from(X)) -> active#(X)
p5: active#(fst(X1,X2)) -> active#(X2)
p6: active#(fst(X1,X2)) -> active#(X1)
p7: active#(cons(X1,X2)) -> active#(X1)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        active#_A(x1) = x1
        len_A(x1) = x1 + 1
        add_A(x1,x2) = x1 + x2 + 1
        from_A(x1) = x1 + 1
        fst_A(x1,x2) = x1 + x2 + 1
        cons_A(x1,x2) = x1 + x2 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        cons > fst > active# > from > add > len
      
      argument filter:
    
        pi(active#) = [1]
        pi(len) = [1]
        pi(add) = [1, 2]
        pi(from) = [1]
        pi(fst) = [1, 2]
        pi(cons) = [1, 2]
    

The next rules are strictly ordered:

  p1, p2, p3, p4, p5, p6, p7
  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

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#(len(X)) -> proper#(X)
p2: proper#(add(X1,X2)) -> proper#(X2)
p3: proper#(add(X1,X2)) -> proper#(X1)
p4: proper#(from(X)) -> proper#(X)
p5: proper#(fst(X1,X2)) -> proper#(X2)
p6: proper#(fst(X1,X2)) -> proper#(X1)
p7: proper#(cons(X1,X2)) -> proper#(X2)
p8: proper#(cons(X1,X2)) -> proper#(X1)
p9: proper#(s(X)) -> proper#(X)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        proper#_A(x1) = x1
        len_A(x1) = x1 + 1
        add_A(x1,x2) = x1 + x2 + 1
        from_A(x1) = x1 + 1
        fst_A(x1,x2) = x1 + x2 + 1
        cons_A(x1,x2) = x1 + x2 + 1
        s_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        proper# > s > cons > fst > from > add > len
      
      argument filter:
    
        pi(proper#) = [1]
        pi(len) = [1]
        pi(add) = [1, 2]
        pi(from) = [1]
        pi(fst) = [1, 2]
        pi(cons) = 1
        pi(s) = [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: cons#(mark(X1),X2) -> cons#(X1,X2)
p2: cons#(ok(X1),ok(X2)) -> cons#(X1,X2)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        cons#_A(x1,x2) = x1 + x2
        mark_A(x1) = x1 + 1
        ok_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        cons# > ok > mark
      
      argument filter:
    
        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: fst#(mark(X1),X2) -> fst#(X1,X2)
p2: fst#(ok(X1),ok(X2)) -> fst#(X1,X2)
p3: fst#(X1,mark(X2)) -> fst#(X1,X2)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        fst#_A(x1,x2) = x1 + x2
        mark_A(x1) = x1 + 1
        ok_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        fst# > ok > mark
      
      argument filter:
    
        pi(fst#) = 1
        pi(mark) = 1
        pi(ok) = [1]
    

The next rules are strictly ordered:

  p1, p2, p3

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: from#(mark(X)) -> from#(X)
p2: from#(ok(X)) -> from#(X)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        from#_A(x1) = x1
        mark_A(x1) = x1 + 1
        ok_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        from# > ok > mark
      
      argument filter:
    
        pi(from#) = 1
        pi(mark) = [1]
        pi(ok) = [1]
    

The next rules are strictly ordered:

  p1, p2
  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

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(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        s#_A(x1) = x1
        ok_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        ok > s#
      
      argument filter:
    
        pi(s#) = 1
        pi(ok) = [1]
    

The next rules are strictly ordered:

  p1
  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

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(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        add#_A(x1,x2) = x1 + x2
        mark_A(x1) = x1 + 1
        ok_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        add# > ok > mark
      
      argument filter:
    
        pi(add#) = 1
        pi(mark) = 1
        pi(ok) = [1]
    

The next rules are strictly ordered:

  p1, p2, p3

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: len#(mark(X)) -> len#(X)
p2: len#(ok(X)) -> len#(X)

and R consists of:

r1: active(fst(|0|(),Z)) -> mark(nil())
r2: active(fst(s(X),cons(Y,Z))) -> mark(cons(Y,fst(X,Z)))
r3: active(from(X)) -> mark(cons(X,from(s(X))))
r4: active(add(|0|(),X)) -> mark(X)
r5: active(add(s(X),Y)) -> mark(s(add(X,Y)))
r6: active(len(nil())) -> mark(|0|())
r7: active(len(cons(X,Z))) -> mark(s(len(Z)))
r8: active(cons(X1,X2)) -> cons(active(X1),X2)
r9: active(fst(X1,X2)) -> fst(active(X1),X2)
r10: active(fst(X1,X2)) -> fst(X1,active(X2))
r11: active(from(X)) -> from(active(X))
r12: active(add(X1,X2)) -> add(active(X1),X2)
r13: active(add(X1,X2)) -> add(X1,active(X2))
r14: active(len(X)) -> len(active(X))
r15: cons(mark(X1),X2) -> mark(cons(X1,X2))
r16: fst(mark(X1),X2) -> mark(fst(X1,X2))
r17: fst(X1,mark(X2)) -> mark(fst(X1,X2))
r18: from(mark(X)) -> mark(from(X))
r19: add(mark(X1),X2) -> mark(add(X1,X2))
r20: add(X1,mark(X2)) -> mark(add(X1,X2))
r21: len(mark(X)) -> mark(len(X))
r22: proper(|0|()) -> ok(|0|())
r23: proper(s(X)) -> s(proper(X))
r24: proper(nil()) -> ok(nil())
r25: proper(cons(X1,X2)) -> cons(proper(X1),proper(X2))
r26: proper(fst(X1,X2)) -> fst(proper(X1),proper(X2))
r27: proper(from(X)) -> from(proper(X))
r28: proper(add(X1,X2)) -> add(proper(X1),proper(X2))
r29: proper(len(X)) -> len(proper(X))
r30: s(ok(X)) -> ok(s(X))
r31: cons(ok(X1),ok(X2)) -> ok(cons(X1,X2))
r32: fst(ok(X1),ok(X2)) -> ok(fst(X1,X2))
r33: from(ok(X)) -> ok(from(X))
r34: add(ok(X1),ok(X2)) -> ok(add(X1,X2))
r35: len(ok(X)) -> ok(len(X))
r36: top(mark(X)) -> top(proper(X))
r37: 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. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        len#_A(x1) = x1
        mark_A(x1) = x1 + 1
        ok_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        len# > ok > mark
      
      argument filter:
    
        pi(len#) = 1
        pi(mark) = [1]
        pi(ok) = [1]
    

The next rules are strictly ordered:

  p1, p2
  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

We remove them from the problem.  Then no dependency pair remains.