YES

We show the termination of the TRS R:

  -(x,|0|()) -> x
  -(s(x),s(y)) -> -(x,y)
  *(x,|0|()) -> |0|()
  *(x,s(y)) -> +(*(x,y),x)
  if(true(),x,y) -> x
  if(false(),x,y) -> y
  odd(|0|()) -> false()
  odd(s(|0|())) -> true()
  odd(s(s(x))) -> odd(x)
  half(|0|()) -> |0|()
  half(s(|0|())) -> |0|()
  half(s(s(x))) -> s(half(x))
  if(true(),x,y) -> true()
  if(false(),x,y) -> false()
  pow(x,y) -> f(x,y,s(|0|()))
  f(x,|0|(),z) -> z
  f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

-- SCC decomposition.

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

p1: -#(s(x),s(y)) -> -#(x,y)
p2: *#(x,s(y)) -> *#(x,y)
p3: odd#(s(s(x))) -> odd#(x)
p4: half#(s(s(x))) -> half#(x)
p5: pow#(x,y) -> f#(x,y,s(|0|()))
p6: f#(x,s(y),z) -> if#(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))
p7: f#(x,s(y),z) -> odd#(s(y))
p8: f#(x,s(y),z) -> f#(x,y,*(x,z))
p9: f#(x,s(y),z) -> *#(x,z)
p10: f#(x,s(y),z) -> f#(*(x,x),half(s(y)),z)
p11: f#(x,s(y),z) -> *#(x,x)
p12: f#(x,s(y),z) -> half#(s(y))

and R consists of:

r1: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The estimated dependency graph contains the following SCCs:

  {p1}
  {p8, p10}
  {p2}
  {p3}
  {p4}


-- 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: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        s > -#
      
      argument filter:
    
        pi(-#) = [2]
        pi(s) = [1]
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        s > -#
      
      argument filter:
    
        pi(-#) = [2]
        pi(s) = [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: f#(x,s(y),z) -> f#(*(x,x),half(s(y)),z)
p2: f#(x,s(y),z) -> f#(x,y,*(x,z))

and R consists of:

r1: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The set of usable rules consists of

  r3, r4, r10, r11, r12

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        + > f# > half > s > * > |0|
      
      argument filter:
    
        pi(f#) = 2
        pi(s) = 1
        pi(*) = [1]
        pi(half) = 1
        pi(|0|) = []
        pi(+) = 2
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        + > |0| > s > half > * > f#
      
      argument filter:
    
        pi(f#) = [2]
        pi(s) = [1]
        pi(*) = 1
        pi(half) = 1
        pi(|0|) = []
        pi(+) = []
    

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: f#(x,s(y),z) -> f#(*(x,x),half(s(y)),z)

and R consists of:

r1: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The estimated dependency graph contains the following SCCs:

  {p1}


-- Reduction pair.

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

p1: f#(x,s(y),z) -> f#(*(x,x),half(s(y)),z)

and R consists of:

r1: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The set of usable rules consists of

  r3, r4, r10, r11, r12

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        + > half > s > * > |0| > f#
      
      argument filter:
    
        pi(f#) = 2
        pi(s) = [1]
        pi(*) = []
        pi(half) = 1
        pi(|0|) = []
        pi(+) = 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        s > half > |0| > * > + > f#
      
      argument filter:
    
        pi(f#) = 2
        pi(s) = []
        pi(*) = []
        pi(half) = []
        pi(|0|) = []
        pi(+) = []
    

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: *#(x,s(y)) -> *#(x,y)

and R consists of:

r1: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        *# > s
      
      argument filter:
    
        pi(*#) = 2
        pi(s) = 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        s > *#
      
      argument filter:
    
        pi(*#) = 2
        pi(s) = [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: odd#(s(s(x))) -> odd#(x)

and R consists of:

r1: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        s > odd#
      
      argument filter:
    
        pi(odd#) = [1]
        pi(s) = [1]
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        s > odd#
      
      argument filter:
    
        pi(odd#) = [1]
        pi(s) = [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

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: -(x,|0|()) -> x
r2: -(s(x),s(y)) -> -(x,y)
r3: *(x,|0|()) -> |0|()
r4: *(x,s(y)) -> +(*(x,y),x)
r5: if(true(),x,y) -> x
r6: if(false(),x,y) -> y
r7: odd(|0|()) -> false()
r8: odd(s(|0|())) -> true()
r9: odd(s(s(x))) -> odd(x)
r10: half(|0|()) -> |0|()
r11: half(s(|0|())) -> |0|()
r12: half(s(s(x))) -> s(half(x))
r13: if(true(),x,y) -> true()
r14: if(false(),x,y) -> false()
r15: pow(x,y) -> f(x,y,s(|0|()))
r16: f(x,|0|(),z) -> z
r17: f(x,s(y),z) -> if(odd(s(y)),f(x,y,*(x,z)),f(*(x,x),half(s(y)),z))

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        s > half#
      
      argument filter:
    
        pi(half#) = [1]
        pi(s) = [1]
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        s > half#
      
      argument filter:
    
        pi(half#) = [1]
        pi(s) = [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

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