YES

Problem:
 g(A()) -> A()
 g(B()) -> A()
 g(B()) -> B()
 g(C()) -> A()
 g(C()) -> B()
 g(C()) -> C()
 foldB(t,0()) -> t
 foldB(t,s(n)) -> f(foldB(t,n),B())
 foldC(t,0()) -> t
 foldC(t,s(n)) -> f(foldC(t,n),C())
 f(t,x) -> f'(t,g(x))
 f'(triple(a,b,c),C()) -> triple(a,b,s(c))
 f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
 f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
 f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
 fold(t,x,0()) -> t
 fold(t,x,s(n)) -> f(fold(t,x,n),x)

Proof:
 DP Processor:
  DPs:
   foldB#(t,s(n)) -> foldB#(t,n)
   foldB#(t,s(n)) -> f#(foldB(t,n),B())
   foldC#(t,s(n)) -> foldC#(t,n)
   foldC#(t,s(n)) -> f#(foldC(t,n),C())
   f#(t,x) -> g#(x)
   f#(t,x) -> f'#(t,g(x))
   f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A())
   f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b)
   f'#(triple(a,b,c),A()) -> f''#(foldB(triple(s(a),0(),c),b))
   f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c)
   fold#(t,x,s(n)) -> fold#(t,x,n)
   fold#(t,x,s(n)) -> f#(fold(t,x,n),x)
  TRS:
   g(A()) -> A()
   g(B()) -> A()
   g(B()) -> B()
   g(C()) -> A()
   g(C()) -> B()
   g(C()) -> C()
   foldB(t,0()) -> t
   foldB(t,s(n)) -> f(foldB(t,n),B())
   foldC(t,0()) -> t
   foldC(t,s(n)) -> f(foldC(t,n),C())
   f(t,x) -> f'(t,g(x))
   f'(triple(a,b,c),C()) -> triple(a,b,s(c))
   f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
   f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
   f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
   fold(t,x,0()) -> t
   fold(t,x,s(n)) -> f(fold(t,x,n),x)
  TDG Processor:
   DPs:
    foldB#(t,s(n)) -> foldB#(t,n)
    foldB#(t,s(n)) -> f#(foldB(t,n),B())
    foldC#(t,s(n)) -> foldC#(t,n)
    foldC#(t,s(n)) -> f#(foldC(t,n),C())
    f#(t,x) -> g#(x)
    f#(t,x) -> f'#(t,g(x))
    f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A())
    f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b)
    f'#(triple(a,b,c),A()) -> f''#(foldB(triple(s(a),0(),c),b))
    f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c)
    fold#(t,x,s(n)) -> fold#(t,x,n)
    fold#(t,x,s(n)) -> f#(fold(t,x,n),x)
   TRS:
    g(A()) -> A()
    g(B()) -> A()
    g(B()) -> B()
    g(C()) -> A()
    g(C()) -> B()
    g(C()) -> C()
    foldB(t,0()) -> t
    foldB(t,s(n)) -> f(foldB(t,n),B())
    foldC(t,0()) -> t
    foldC(t,s(n)) -> f(foldC(t,n),C())
    f(t,x) -> f'(t,g(x))
    f'(triple(a,b,c),C()) -> triple(a,b,s(c))
    f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
    f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
    f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
    fold(t,x,0()) -> t
    fold(t,x,s(n)) -> f(fold(t,x,n),x)
   graph:
    fold#(t,x,s(n)) -> fold#(t,x,n) ->
    fold#(t,x,s(n)) -> f#(fold(t,x,n),x)
    fold#(t,x,s(n)) -> fold#(t,x,n) ->
    fold#(t,x,s(n)) -> fold#(t,x,n)
    fold#(t,x,s(n)) -> f#(fold(t,x,n),x) ->
    f#(t,x) -> f'#(t,g(x))
    fold#(t,x,s(n)) -> f#(fold(t,x,n),x) ->
    f#(t,x) -> g#(x)
    f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c) ->
    foldC#(t,s(n)) -> f#(foldC(t,n),C())
    f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c) ->
    foldC#(t,s(n)) -> foldC#(t,n)
    f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A()) ->
    f#(t,x) -> f'#(t,g(x))
    f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A()) ->
    f#(t,x) -> g#(x)
    f'#(triple(a,b,c),A()) -> f''#(foldB(triple(s(a),0(),c),b)) ->
    f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c)
    f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b) ->
    foldB#(t,s(n)) -> f#(foldB(t,n),B())
    f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b) ->
    foldB#(t,s(n)) -> foldB#(t,n)
    foldC#(t,s(n)) -> foldC#(t,n) ->
    foldC#(t,s(n)) -> f#(foldC(t,n),C())
    foldC#(t,s(n)) -> foldC#(t,n) ->
    foldC#(t,s(n)) -> foldC#(t,n)
    foldC#(t,s(n)) -> f#(foldC(t,n),C()) ->
    f#(t,x) -> f'#(t,g(x))
    foldC#(t,s(n)) -> f#(foldC(t,n),C()) -> f#(t,x) -> g#(x)
    f#(t,x) -> f'#(t,g(x)) ->
    f'#(triple(a,b,c),A()) -> f''#(foldB(triple(s(a),0(),c),b))
    f#(t,x) -> f'#(t,g(x)) ->
    f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b)
    f#(t,x) -> f'#(t,g(x)) ->
    f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A())
    foldB#(t,s(n)) -> f#(foldB(t,n),B()) ->
    f#(t,x) -> f'#(t,g(x))
    foldB#(t,s(n)) -> f#(foldB(t,n),B()) -> f#(t,x) -> g#(x)
    foldB#(t,s(n)) -> foldB#(t,n) ->
    foldB#(t,s(n)) -> f#(foldB(t,n),B())
    foldB#(t,s(n)) -> foldB#(t,n) -> foldB#(t,s(n)) -> foldB#(t,n)
   SCC Processor:
    #sccs: 2
    #rules: 10
    #arcs: 22/144
    DPs:
     fold#(t,x,s(n)) -> fold#(t,x,n)
    TRS:
     g(A()) -> A()
     g(B()) -> A()
     g(B()) -> B()
     g(C()) -> A()
     g(C()) -> B()
     g(C()) -> C()
     foldB(t,0()) -> t
     foldB(t,s(n)) -> f(foldB(t,n),B())
     foldC(t,0()) -> t
     foldC(t,s(n)) -> f(foldC(t,n),C())
     f(t,x) -> f'(t,g(x))
     f'(triple(a,b,c),C()) -> triple(a,b,s(c))
     f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
     f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
     f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
     fold(t,x,0()) -> t
     fold(t,x,s(n)) -> f(fold(t,x,n),x)
    Subterm Criterion Processor:
     simple projection:
      pi(fold#) = 2
     problem:
      DPs:
       
      TRS:
       g(A()) -> A()
       g(B()) -> A()
       g(B()) -> B()
       g(C()) -> A()
       g(C()) -> B()
       g(C()) -> C()
       foldB(t,0()) -> t
       foldB(t,s(n)) -> f(foldB(t,n),B())
       foldC(t,0()) -> t
       foldC(t,s(n)) -> f(foldC(t,n),C())
       f(t,x) -> f'(t,g(x))
       f'(triple(a,b,c),C()) -> triple(a,b,s(c))
       f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
       f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
       f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
       fold(t,x,0()) -> t
       fold(t,x,s(n)) -> f(fold(t,x,n),x)
     Qed
    
    DPs:
     f#(t,x) -> f'#(t,g(x))
     f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A())
     f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b)
     foldB#(t,s(n)) -> foldB#(t,n)
     foldB#(t,s(n)) -> f#(foldB(t,n),B())
     f'#(triple(a,b,c),A()) -> f''#(foldB(triple(s(a),0(),c),b))
     f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c)
     foldC#(t,s(n)) -> foldC#(t,n)
     foldC#(t,s(n)) -> f#(foldC(t,n),C())
    TRS:
     g(A()) -> A()
     g(B()) -> A()
     g(B()) -> B()
     g(C()) -> A()
     g(C()) -> B()
     g(C()) -> C()
     foldB(t,0()) -> t
     foldB(t,s(n)) -> f(foldB(t,n),B())
     foldC(t,0()) -> t
     foldC(t,s(n)) -> f(foldC(t,n),C())
     f(t,x) -> f'(t,g(x))
     f'(triple(a,b,c),C()) -> triple(a,b,s(c))
     f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
     f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
     f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
     fold(t,x,0()) -> t
     fold(t,x,s(n)) -> f(fold(t,x,n),x)
    Usable Rule Processor:
     DPs:
      f#(t,x) -> f'#(t,g(x))
      f'#(triple(a,b,c),B()) -> f#(triple(a,b,c),A())
      f'#(triple(a,b,c),A()) -> foldB#(triple(s(a),0(),c),b)
      foldB#(t,s(n)) -> foldB#(t,n)
      foldB#(t,s(n)) -> f#(foldB(t,n),B())
      f'#(triple(a,b,c),A()) -> f''#(foldB(triple(s(a),0(),c),b))
      f''#(triple(a,b,c)) -> foldC#(triple(a,b,0()),c)
      foldC#(t,s(n)) -> foldC#(t,n)
      foldC#(t,s(n)) -> f#(foldC(t,n),C())
     TRS:
      g(A()) -> A()
      g(B()) -> A()
      g(B()) -> B()
      g(C()) -> A()
      g(C()) -> B()
      g(C()) -> C()
      foldB(t,0()) -> t
      foldB(t,s(n)) -> f(foldB(t,n),B())
      f(t,x) -> f'(t,g(x))
      f'(triple(a,b,c),C()) -> triple(a,b,s(c))
      f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
      f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
      f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
      foldC(t,0()) -> t
      foldC(t,s(n)) -> f(foldC(t,n),C())
     Semantic Labeling Processor:
      dimension: 1
      usable rules:
       foldB(t,0()) -> t
       foldB(t,s(n)) -> f(foldB(t,n),B())
       f(t,x) -> f'(t,g(x))
       f'(triple(a,b,c),C()) -> triple(a,b,s(c))
       f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
       f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
       f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
       foldC(t,0()) -> t
       foldC(t,s(n)) -> f(foldC(t,n),C())
      interpretation:
       [f''](x0) = x0 + 2,
       
       [triple](x0, x1, x2) = 2x1 + x2,
       
       [f'](x0, x1) = x0 + x1 + 2,
       
       [foldC](x0, x1) = x0 + x1,
       
       [f](x0, x1) = x0 + x1 + 2,
       
       [s](x0) = x0 + 3,
       
       [foldB](x0, x1) = x0 + x1,
       
       [0] = 0,
       
       [C] = 1,
       
       [B] = 1,
       
       [g](x0) = x0,
       
       [A] = 0
       labeled:
        f#
        f'#
        triple
        foldB#
        foldB
        foldC#
        foldC
        f
        f'
        f''
       usable (for model):
        f#
        f'#
        g
        triple
        B
        A
        foldB#
        s
        0
        foldB
        f''#
        foldC#
        foldC
        C
        f
        f'
        f''
       argument filtering:
        pi(A) = []
        pi(g) = []
        pi(B) = []
        pi(C) = []
        pi(0) = []
        pi(foldB) = [0]
        pi(s) = 0
        pi(f) = []
        pi(foldC) = [0]
        pi(f') = []
        pi(triple) = []
        pi(f'') = []
        pi(foldB#) = []
        pi(f#) = []
        pi(foldC#) = []
        pi(f'#) = []
        pi(f''#) = 0
      precedence:
       f'# > foldC > foldB > f > f' > foldB# ~ triple > foldC# > f''# ~ 
       f# ~ f'' ~ s ~ 0 ~ C ~ B ~ g ~ A
      problem:
       DPs:
        
       TRS:
        g(A()) -> A()
        g(B()) -> A()
        g(B()) -> B()
        g(C()) -> A()
        g(C()) -> B()
        g(C()) -> C()
        foldB(t,0()) -> t
        foldB(t,s(n)) -> f(foldB(t,n),B())
        f(t,x) -> f'(t,g(x))
        f'(triple(a,b,c),C()) -> triple(a,b,s(c))
        f'(triple(a,b,c),B()) -> f(triple(a,b,c),A())
        f'(triple(a,b,c),A()) -> f''(foldB(triple(s(a),0(),c),b))
        f''(triple(a,b,c)) -> foldC(triple(a,b,0()),c)
        foldC(t,0()) -> t
        foldC(t,s(n)) -> f(foldC(t,n),C())
      Qed