YES

We show the termination of the relative TRS R/S:

  R:
  half(|0|()) -> |0|()
  half(s(s(x))) -> s(half(x))
  log(s(|0|())) -> |0|()
  log(s(s(x))) -> s(log(s(half(x))))

  S:
  rand(x) -> x
  rand(x) -> rand(s(x))

-- SCC decomposition.

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

p1: half#(s(s(x))) -> half#(x)
p2: log#(s(s(x))) -> log#(s(half(x)))
p3: log#(s(s(x))) -> half#(x)

and R consists of:

r1: half(|0|()) -> |0|()
r2: half(s(s(x))) -> s(half(x))
r3: log(s(|0|())) -> |0|()
r4: log(s(s(x))) -> s(log(s(half(x))))
r5: rand(x) -> x
r6: rand(x) -> rand(s(x))

The estimated dependency graph contains the following SCCs:

  {p2}
  {p1}


-- Reduction pair.

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

p1: log#(s(s(x))) -> log#(s(half(x)))

and R consists of:

r1: half(|0|()) -> |0|()
r2: half(s(s(x))) -> s(half(x))
r3: log(s(|0|())) -> |0|()
r4: log(s(s(x))) -> s(log(s(half(x))))
r5: rand(x) -> x
r6: rand(x) -> rand(s(x))

The set of usable rules consists of

  r1, r2, r3, r4, r5, r6

Take the reduction pair:

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

The next rules are strictly ordered:

  p1

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

-- Reduction pair.

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

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

and R consists of:

r1: half(|0|()) -> |0|()
r2: half(s(s(x))) -> s(half(x))
r3: log(s(|0|())) -> |0|()
r4: log(s(s(x))) -> s(log(s(half(x))))
r5: rand(x) -> x
r6: rand(x) -> rand(s(x))

The set of usable rules consists of

  r1, r2, r3, r4, r5, r6

Take the reduction pair:

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

The next rules are strictly ordered:

  p1

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