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 monotone reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      -#_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2
      s_A(x1) = ((1,0),(1,1)) x1 + (1,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: 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:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      f#_A(x1,x2,x3) = ((0,0),(1,0)) x2
      s_A(x1) = x1 + (1,4)
      *_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (1,1)
      half_A(x1) = x1 + (0,3)
      |0|_A() = (1,2)
      +_A(x1,x2) = x1 + (0,1)

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:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      f#_A(x1,x2,x3) = x2
      s_A(x1) = x1 + (1,3)
      *_A(x1,x2) = x2 + (1,1)
      half_A(x1) = x1 + (0,2)
      |0|_A() = (1,1)
      +_A(x1,x2) = x1 + ((0,0),(1,0)) x2 + (0,5)

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:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      *#_A(x1,x2) = x2
      s_A(x1) = ((1,0),(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: 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 reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      odd#_A(x1) = ((1,0),(1,0)) x1
      s_A(x1) = ((1,0),(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: -(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:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      half#_A(x1) = ((1,0),(1,0)) x1
      s_A(x1) = ((1,0),(1,1)) x1 + (1,1)

The next rules are strictly ordered:

  p1

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