YES

We show the termination of the TRS R:

  double(|0|()) -> |0|()
  double(s(x)) -> s(s(double(x)))
  half(|0|()) -> |0|()
  half(s(|0|())) -> |0|()
  half(s(s(x))) -> s(half(x))
  -(x,|0|()) -> x
  -(s(x),s(y)) -> -(x,y)
  if(|0|(),y,z) -> y
  if(s(x),y,z) -> z
  half(double(x)) -> x

-- SCC decomposition.

Consider the dependency pair problem (P, R), where P consists of

p1: double#(s(x)) -> double#(x)
p2: half#(s(s(x))) -> half#(x)
p3: -#(s(x),s(y)) -> -#(x,y)

and R consists of:

r1: double(|0|()) -> |0|()
r2: double(s(x)) -> s(s(double(x)))
r3: half(|0|()) -> |0|()
r4: half(s(|0|())) -> |0|()
r5: half(s(s(x))) -> s(half(x))
r6: -(x,|0|()) -> x
r7: -(s(x),s(y)) -> -(x,y)
r8: if(|0|(),y,z) -> y
r9: if(s(x),y,z) -> z
r10: half(double(x)) -> x

The estimated dependency graph contains the following SCCs:

  {p1}
  {p2}
  {p3}


-- Reduction pair.

Consider the dependency pair problem (P, R), where P consists of

p1: double#(s(x)) -> double#(x)

and R consists of:

r1: double(|0|()) -> |0|()
r2: double(s(x)) -> s(s(double(x)))
r3: half(|0|()) -> |0|()
r4: half(s(|0|())) -> |0|()
r5: half(s(s(x))) -> s(half(x))
r6: -(x,|0|()) -> x
r7: -(s(x),s(y)) -> -(x,y)
r8: if(|0|(),y,z) -> y
r9: if(s(x),y,z) -> z
r10: half(double(x)) -> 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:
        double#_A(x1) = ((1,1),(1,1)) x1
        s_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        double#_A(x1) = x1
        s_A(x1) = x1 + (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        double#_A(x1) = ((0,1),(1,1)) x1
        s_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: half#(s(s(x))) -> half#(x)

and R consists of:

r1: double(|0|()) -> |0|()
r2: double(s(x)) -> s(s(double(x)))
r3: half(|0|()) -> |0|()
r4: half(s(|0|())) -> |0|()
r5: half(s(s(x))) -> s(half(x))
r6: -(x,|0|()) -> x
r7: -(s(x),s(y)) -> -(x,y)
r8: if(|0|(),y,z) -> y
r9: if(s(x),y,z) -> z
r10: half(double(x)) -> 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:
        half#_A(x1) = x1
        s_A(x1) = x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        half#_A(x1) = ((0,1),(0,0)) x1
        s_A(x1) = (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        half#_A(x1) = (0,0)
        s_A(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: -#(s(x),s(y)) -> -#(x,y)

and R consists of:

r1: double(|0|()) -> |0|()
r2: double(s(x)) -> s(s(double(x)))
r3: half(|0|()) -> |0|()
r4: half(s(|0|())) -> |0|()
r5: half(s(s(x))) -> s(half(x))
r6: -(x,|0|()) -> x
r7: -(s(x),s(y)) -> -(x,y)
r8: if(|0|(),y,z) -> y
r9: if(s(x),y,z) -> z
r10: half(double(x)) -> 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:
        -#_A(x1,x2) = ((1,1),(0,0)) x1 + ((0,0),(1,1)) x2
        s_A(x1) = ((1,1),(1,1)) x1 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        -#_A(x1,x2) = ((1,0),(1,1)) x1
        s_A(x1) = ((1,1),(0,1)) x1 + (0,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        -#_A(x1,x2) = ((1,0),(1,1)) x1
        s_A(x1) = ((1,1),(1,0)) x1 + (0,1)
    

The next rules are strictly ordered:

  p1

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