YES

We show the termination of the TRS R:

  active(f(f(a()))) -> mark(f(g(f(a()))))
  active(g(X)) -> g(active(X))
  g(mark(X)) -> mark(g(X))
  proper(f(X)) -> f(proper(X))
  proper(a()) -> ok(a())
  proper(g(X)) -> g(proper(X))
  f(ok(X)) -> ok(f(X))
  g(ok(X)) -> ok(g(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#(f(f(a()))) -> f#(g(f(a())))
p2: active#(f(f(a()))) -> g#(f(a()))
p3: active#(g(X)) -> g#(active(X))
p4: active#(g(X)) -> active#(X)
p5: g#(mark(X)) -> g#(X)
p6: proper#(f(X)) -> f#(proper(X))
p7: proper#(f(X)) -> proper#(X)
p8: proper#(g(X)) -> g#(proper(X))
p9: proper#(g(X)) -> proper#(X)
p10: f#(ok(X)) -> f#(X)
p11: g#(ok(X)) -> g#(X)
p12: top#(mark(X)) -> top#(proper(X))
p13: top#(mark(X)) -> proper#(X)
p14: top#(ok(X)) -> top#(active(X))
p15: top#(ok(X)) -> active#(X)

and R consists of:

r1: active(f(f(a()))) -> mark(f(g(f(a()))))
r2: active(g(X)) -> g(active(X))
r3: g(mark(X)) -> mark(g(X))
r4: proper(f(X)) -> f(proper(X))
r5: proper(a()) -> ok(a())
r6: proper(g(X)) -> g(proper(X))
r7: f(ok(X)) -> ok(f(X))
r8: g(ok(X)) -> ok(g(X))
r9: top(mark(X)) -> top(proper(X))
r10: top(ok(X)) -> top(active(X))

The estimated dependency graph contains the following SCCs:

  {p12, p14}
  {p4}
  {p7, p9}
  {p5, p11}
  {p10}


-- 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(f(f(a()))) -> mark(f(g(f(a()))))
r2: active(g(X)) -> g(active(X))
r3: g(mark(X)) -> mark(g(X))
r4: proper(f(X)) -> f(proper(X))
r5: proper(a()) -> ok(a())
r6: proper(g(X)) -> g(proper(X))
r7: f(ok(X)) -> ok(f(X))
r8: g(ok(X)) -> ok(g(X))
r9: top(mark(X)) -> top(proper(X))
r10: top(ok(X)) -> top(active(X))

The set of usable rules consists of

  r1, r2, r3, r4, r5, r6, r7, r8

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        top#_A(x1) = ((0,1),(0,0)) x1
        ok_A(x1) = x1 + (2,2)
        active_A(x1) = x1 + (1,1)
        mark_A(x1) = x1 + (4,4)
        proper_A(x1) = x1 + (3,3)
        g_A(x1) = ((0,1),(1,0)) x1 + (1,1)
        f_A(x1) = ((1,0),(1,0)) x1 + (6,1)
        a_A() = (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        top#_A(x1) = (0,0)
        ok_A(x1) = (1,0)
        active_A(x1) = ((0,0),(1,0)) x1 + (3,0)
        mark_A(x1) = (0,1)
        proper_A(x1) = ((1,1),(1,1)) x1 + (1,1)
        g_A(x1) = (2,1)
        f_A(x1) = x1 + (1,1)
        a_A() = (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        top#_A(x1) = (0,0)
        ok_A(x1) = (3,0)
        active_A(x1) = (3,0)
        mark_A(x1) = (1,1)
        proper_A(x1) = (5,1)
        g_A(x1) = (2,1)
        f_A(x1) = (4,1)
        a_A() = (0,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: active#(g(X)) -> active#(X)

and R consists of:

r1: active(f(f(a()))) -> mark(f(g(f(a()))))
r2: active(g(X)) -> g(active(X))
r3: g(mark(X)) -> mark(g(X))
r4: proper(f(X)) -> f(proper(X))
r5: proper(a()) -> ok(a())
r6: proper(g(X)) -> g(proper(X))
r7: f(ok(X)) -> ok(f(X))
r8: g(ok(X)) -> ok(g(X))
r9: top(mark(X)) -> top(proper(X))
r10: 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^2
      order: standard order
      interpretations:
        active#_A(x1) = ((1,1),(1,1)) x1
        g_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        active#_A(x1) = x1
        g_A(x1) = x1 + (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        active#_A(x1) = ((0,1),(1,1)) x1
        g_A(x1) = ((0,1),(1,1)) x1 + (1,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: proper#(g(X)) -> proper#(X)
p2: proper#(f(X)) -> proper#(X)

and R consists of:

r1: active(f(f(a()))) -> mark(f(g(f(a()))))
r2: active(g(X)) -> g(active(X))
r3: g(mark(X)) -> mark(g(X))
r4: proper(f(X)) -> f(proper(X))
r5: proper(a()) -> ok(a())
r6: proper(g(X)) -> g(proper(X))
r7: f(ok(X)) -> ok(f(X))
r8: g(ok(X)) -> ok(g(X))
r9: top(mark(X)) -> top(proper(X))
r10: 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^2
      order: standard order
      interpretations:
        proper#_A(x1) = ((1,1),(1,1)) x1
        g_A(x1) = ((1,1),(1,1)) x1 + (1,1)
        f_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        proper#_A(x1) = ((1,1),(1,1)) x1
        g_A(x1) = ((1,1),(1,1)) x1 + (1,1)
        f_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        proper#_A(x1) = ((1,1),(1,1)) x1
        g_A(x1) = ((1,1),(1,1)) x1 + (1,1)
        f_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    

The next rules are strictly ordered:

  p1, p2
  r1, r2, r3, r4, r5, r6, r7, r8, r9, r10

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

and R consists of:

r1: active(f(f(a()))) -> mark(f(g(f(a()))))
r2: active(g(X)) -> g(active(X))
r3: g(mark(X)) -> mark(g(X))
r4: proper(f(X)) -> f(proper(X))
r5: proper(a()) -> ok(a())
r6: proper(g(X)) -> g(proper(X))
r7: f(ok(X)) -> ok(f(X))
r8: g(ok(X)) -> ok(g(X))
r9: top(mark(X)) -> top(proper(X))
r10: 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^2
      order: standard order
      interpretations:
        g#_A(x1) = ((1,1),(1,1)) x1
        mark_A(x1) = ((1,1),(1,1)) x1 + (1,1)
        ok_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        g#_A(x1) = ((1,1),(1,1)) x1
        mark_A(x1) = ((1,1),(1,1)) x1 + (1,1)
        ok_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        g#_A(x1) = ((1,1),(0,1)) x1
        mark_A(x1) = ((0,1),(1,1)) x1 + (1,1)
        ok_A(x1) = ((1,1),(1,1)) x1 + (1,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: f#(ok(X)) -> f#(X)

and R consists of:

r1: active(f(f(a()))) -> mark(f(g(f(a()))))
r2: active(g(X)) -> g(active(X))
r3: g(mark(X)) -> mark(g(X))
r4: proper(f(X)) -> f(proper(X))
r5: proper(a()) -> ok(a())
r6: proper(g(X)) -> g(proper(X))
r7: f(ok(X)) -> ok(f(X))
r8: g(ok(X)) -> ok(g(X))
r9: top(mark(X)) -> top(proper(X))
r10: 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^2
      order: standard order
      interpretations:
        f#_A(x1) = ((1,1),(1,0)) x1
        ok_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        f#_A(x1) = ((1,1),(1,0)) x1
        ok_A(x1) = ((1,1),(0,1)) x1 + (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        f#_A(x1) = ((0,1),(1,1)) x1
        ok_A(x1) = ((0,1),(1,1)) x1 + (1,1)
    

The next rules are strictly ordered:

  p1

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