YES

We show the termination of the TRS R:

  sqr(|0|()) -> |0|()
  sqr(s(x)) -> +(sqr(x),s(double(x)))
  double(|0|()) -> |0|()
  double(s(x)) -> s(s(double(x)))
  +(x,|0|()) -> x
  +(x,s(y)) -> s(+(x,y))
  sqr(s(x)) -> s(+(sqr(x),double(x)))

-- SCC decomposition.

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

p1: sqr#(s(x)) -> +#(sqr(x),s(double(x)))
p2: sqr#(s(x)) -> sqr#(x)
p3: sqr#(s(x)) -> double#(x)
p4: double#(s(x)) -> double#(x)
p5: +#(x,s(y)) -> +#(x,y)
p6: sqr#(s(x)) -> +#(sqr(x),double(x))
p7: sqr#(s(x)) -> sqr#(x)
p8: sqr#(s(x)) -> double#(x)

and R consists of:

r1: sqr(|0|()) -> |0|()
r2: sqr(s(x)) -> +(sqr(x),s(double(x)))
r3: double(|0|()) -> |0|()
r4: double(s(x)) -> s(s(double(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: sqr(s(x)) -> s(+(sqr(x),double(x)))

The estimated dependency graph contains the following SCCs:

  {p2, p7}
  {p5}
  {p4}


-- Reduction pair.

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

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

and R consists of:

r1: sqr(|0|()) -> |0|()
r2: sqr(s(x)) -> +(sqr(x),s(double(x)))
r3: double(|0|()) -> |0|()
r4: double(s(x)) -> s(s(double(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: sqr(s(x)) -> s(+(sqr(x),double(x)))

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

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

The next rules are strictly ordered:

  p1
  r1, r2, r3, r4, r5, r6, r7

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: sqr(|0|()) -> |0|()
r2: sqr(s(x)) -> +(sqr(x),s(double(x)))
r3: double(|0|()) -> |0|()
r4: double(s(x)) -> s(s(double(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: sqr(s(x)) -> s(+(sqr(x),double(x)))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

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

and R consists of:

r1: sqr(|0|()) -> |0|()
r2: sqr(s(x)) -> +(sqr(x),s(double(x)))
r3: double(|0|()) -> |0|()
r4: double(s(x)) -> s(s(double(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: sqr(s(x)) -> s(+(sqr(x),double(x)))

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

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

The next rules are strictly ordered:

  p1
  r1, r2, r3, r4, r5, r6, r7

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