YES

We show the termination of the TRS R:

  .(|1|(),x) -> x
  .(x,|1|()) -> x
  .(i(x),x) -> |1|()
  .(x,i(x)) -> |1|()
  i(|1|()) -> |1|()
  i(i(x)) -> x
  .(i(y),.(y,z)) -> z
  .(y,.(i(y),z)) -> z
  .(.(x,y),z) -> .(x,.(y,z))
  i(.(x,y)) -> .(i(y),i(x))

-- SCC decomposition.

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

p1: .#(.(x,y),z) -> .#(x,.(y,z))
p2: .#(.(x,y),z) -> .#(y,z)
p3: i#(.(x,y)) -> .#(i(y),i(x))
p4: i#(.(x,y)) -> i#(y)
p5: i#(.(x,y)) -> i#(x)

and R consists of:

r1: .(|1|(),x) -> x
r2: .(x,|1|()) -> x
r3: .(i(x),x) -> |1|()
r4: .(x,i(x)) -> |1|()
r5: i(|1|()) -> |1|()
r6: i(i(x)) -> x
r7: .(i(y),.(y,z)) -> z
r8: .(y,.(i(y),z)) -> z
r9: .(.(x,y),z) -> .(x,.(y,z))
r10: i(.(x,y)) -> .(i(y),i(x))

The estimated dependency graph contains the following SCCs:

  {p4, p5}
  {p1, p2}


-- Reduction pair.

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

p1: i#(.(x,y)) -> i#(x)
p2: i#(.(x,y)) -> i#(y)

and R consists of:

r1: .(|1|(),x) -> x
r2: .(x,|1|()) -> x
r3: .(i(x),x) -> |1|()
r4: .(x,i(x)) -> |1|()
r5: i(|1|()) -> |1|()
r6: i(i(x)) -> x
r7: .(i(y),.(y,z)) -> z
r8: .(y,.(i(y),z)) -> z
r9: .(.(x,y),z) -> .(x,.(y,z))
r10: i(.(x,y)) -> .(i(y),i(x))

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:
      
        . > i#
      
      argument filter:
    
        pi(i#) = 1
        pi(.) = [1, 2]
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        . > i#
      
      argument filter:
    
        pi(i#) = 1
        pi(.) = [2]
    
    3. lexicographic path order with precedence:
    
      precedence:
      
        . > i#
      
      argument filter:
    
        pi(i#) = 1
        pi(.) = [2]
    

The next rules are strictly ordered:

  p1, p2

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,y),z) -> .#(x,.(y,z))
p2: .#(.(x,y),z) -> .#(y,z)

and R consists of:

r1: .(|1|(),x) -> x
r2: .(x,|1|()) -> x
r3: .(i(x),x) -> |1|()
r4: .(x,i(x)) -> |1|()
r5: i(|1|()) -> |1|()
r6: i(i(x)) -> x
r7: .(i(y),.(y,z)) -> z
r8: .(y,.(i(y),z)) -> z
r9: .(.(x,y),z) -> .(x,.(y,z))
r10: i(.(x,y)) -> .(i(y),i(x))

The set of usable rules consists of

  r1, r2, r3, r4, r7, r8, r9

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        . > |1| > i > .#
      
      argument filter:
    
        pi(.#) = [1]
        pi(.) = [1, 2]
        pi(|1|) = []
        pi(i) = []
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        |1| > i > . > .#
      
      argument filter:
    
        pi(.#) = []
        pi(.) = 2
        pi(|1|) = []
        pi(i) = []
    
    3. lexicographic path order with precedence:
    
      precedence:
      
        |1| > i > . > .#
      
      argument filter:
    
        pi(.#) = []
        pi(.) = 2
        pi(|1|) = []
        pi(i) = []
    

The next rules are strictly ordered:

  p1, p2

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