Certification Problem

Input (TPDB TRS_Standard/SK90/4.28)

The rewrite relation of the following TRS is considered.

f(x,nil) g(nil,x) (1)
f(x,g(y,z)) g(f(x,y),z) (2)
++(x,nil) x (3)
++(x,g(y,z)) g(++(x,y),z) (4)
null(nil) true (5)
null(g(x,y)) false (6)
mem(nil,y) false (7)
mem(g(x,y),z) or(=(y,z),mem(x,z)) (8)
mem(x,max(x)) not(null(x)) (9)
max(g(g(nil,x),y)) max'(x,y) (10)
max(g(g(g(x,y),z),u)) max'(max(g(g(x,y),z)),u) (11)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(f) = 4 stat(f) = mul
prec(nil) = 0 stat(nil) = mul
prec(g) = 3 stat(g) = mul
prec(++) = 5 stat(++) = lex
prec(null) = 6 stat(null) = mul
prec(true) = 6 stat(true) = mul
prec(false) = 1 stat(false) = mul
prec(mem) = 8 stat(mem) = mul
prec(or) = 2 stat(or) = lex
prec(=) = 8 stat(=) = mul
prec(not) = 7 stat(not) = mul
prec(max') = 3 stat(max') = mul
prec(u) = 9 stat(u) = mul

π(f) = [1,2]
π(nil) = []
π(g) = [1,2]
π(++) = [1,2]
π(null) = [1]
π(true) = []
π(false) = []
π(mem) = [1,2]
π(or) = [1,2]
π(=) = [1,2]
π(max) = 1
π(not) = [1]
π(max') = [1,2]
π(u) = []

all of the following rules can be deleted.
f(x,nil) g(nil,x) (1)
f(x,g(y,z)) g(f(x,y),z) (2)
++(x,nil) x (3)
++(x,g(y,z)) g(++(x,y),z) (4)
null(nil) true (5)
null(g(x,y)) false (6)
mem(nil,y) false (7)
mem(g(x,y),z) or(=(y,z),mem(x,z)) (8)
mem(x,max(x)) not(null(x)) (9)
max(g(g(nil,x),y)) max'(x,y) (10)

1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(u) = 1 weight(u) = 1
prec(max) = 3 weight(max) = 2
prec(g) = 0 weight(g) = 0
prec(max') = 2 weight(max') = 0
all of the following rules can be deleted.
max(g(g(g(x,y),z),u)) max'(max(g(g(x,y),z)),u) (11)

1.1.1 R is empty

There are no rules in the TRS. Hence, it is terminating.