YES

We show the termination of the TRS R:

  -(x,|0|()) -> x
  -(|0|(),s(y)) -> |0|()
  -(s(x),s(y)) -> -(x,y)
  lt(x,|0|()) -> false()
  lt(|0|(),s(y)) -> true()
  lt(s(x),s(y)) -> lt(x,y)
  if(true(),x,y) -> x
  if(false(),x,y) -> y
  div(x,|0|()) -> |0|()
  div(|0|(),y) -> |0|()
  div(s(x),s(y)) -> if(lt(x,y),|0|(),s(div(-(x,y),s(y))))

-- SCC decomposition.

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

p1: -#(s(x),s(y)) -> -#(x,y)
p2: lt#(s(x),s(y)) -> lt#(x,y)
p3: div#(s(x),s(y)) -> if#(lt(x,y),|0|(),s(div(-(x,y),s(y))))
p4: div#(s(x),s(y)) -> lt#(x,y)
p5: div#(s(x),s(y)) -> div#(-(x,y),s(y))
p6: div#(s(x),s(y)) -> -#(x,y)

and R consists of:

r1: -(x,|0|()) -> x
r2: -(|0|(),s(y)) -> |0|()
r3: -(s(x),s(y)) -> -(x,y)
r4: lt(x,|0|()) -> false()
r5: lt(|0|(),s(y)) -> true()
r6: lt(s(x),s(y)) -> lt(x,y)
r7: if(true(),x,y) -> x
r8: if(false(),x,y) -> y
r9: div(x,|0|()) -> |0|()
r10: div(|0|(),y) -> |0|()
r11: div(s(x),s(y)) -> if(lt(x,y),|0|(),s(div(-(x,y),s(y))))

The estimated dependency graph contains the following SCCs:

  {p5}
  {p1}
  {p2}


-- Reduction pair.

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

p1: div#(s(x),s(y)) -> div#(-(x,y),s(y))

and R consists of:

r1: -(x,|0|()) -> x
r2: -(|0|(),s(y)) -> |0|()
r3: -(s(x),s(y)) -> -(x,y)
r4: lt(x,|0|()) -> false()
r5: lt(|0|(),s(y)) -> true()
r6: lt(s(x),s(y)) -> lt(x,y)
r7: if(true(),x,y) -> x
r8: if(false(),x,y) -> y
r9: div(x,|0|()) -> |0|()
r10: div(|0|(),y) -> |0|()
r11: div(s(x),s(y)) -> if(lt(x,y),|0|(),s(div(-(x,y),s(y))))

The set of usable rules consists of

  r1, r2, r3

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^1
    order: standard order
    interpretations:
      div#_A(x1,x2) = x1
      s_A(x1) = x1 + 1
      -_A(x1,x2) = x1
      |0|_A() = 0

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: -(x,|0|()) -> x
r2: -(|0|(),s(y)) -> |0|()
r3: -(s(x),s(y)) -> -(x,y)
r4: lt(x,|0|()) -> false()
r5: lt(|0|(),s(y)) -> true()
r6: lt(s(x),s(y)) -> lt(x,y)
r7: if(true(),x,y) -> x
r8: if(false(),x,y) -> y
r9: div(x,|0|()) -> |0|()
r10: div(|0|(),y) -> |0|()
r11: div(s(x),s(y)) -> if(lt(x,y),|0|(),s(div(-(x,y),s(y))))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^1
    order: standard order
    interpretations:
      -#_A(x1,x2) = x1
      s_A(x1) = x1 + 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: lt#(s(x),s(y)) -> lt#(x,y)

and R consists of:

r1: -(x,|0|()) -> x
r2: -(|0|(),s(y)) -> |0|()
r3: -(s(x),s(y)) -> -(x,y)
r4: lt(x,|0|()) -> false()
r5: lt(|0|(),s(y)) -> true()
r6: lt(s(x),s(y)) -> lt(x,y)
r7: if(true(),x,y) -> x
r8: if(false(),x,y) -> y
r9: div(x,|0|()) -> |0|()
r10: div(|0|(),y) -> |0|()
r11: div(s(x),s(y)) -> if(lt(x,y),|0|(),s(div(-(x,y),s(y))))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^1
    order: standard order
    interpretations:
      lt#_A(x1,x2) = x1
      s_A(x1) = x1 + 1

The next rules are strictly ordered:

  p1

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