Certification Problem

Input (TPDB TRS_Standard/SK90/2.26)

The rewrite relation of the following TRS is considered.

f(0) 0 (1)
f(s(0)) s(0) (2)
f(s(s(x))) p(h(g(x))) (3)
g(0) pair(s(0),s(0)) (4)
g(s(x)) h(g(x)) (5)
h(x) pair(+(p(x),q(x)),p(x)) (6)
p(pair(x,y)) x (7)
q(pair(x,y)) y (8)
+(x,0) x (9)
+(x,s(y)) s(+(x,y)) (10)
f(s(s(x))) +(p(g(x)),q(g(x))) (11)
g(s(x)) pair(+(p(g(x)),q(g(x))),p(g(x))) (12)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Rule Removal

Using the
prec(f) = 6 stat(f) = lex
prec(0) = 2 stat(0) = mul
prec(s) = 1 stat(s) = mul
prec(h) = 4 stat(h) = mul
prec(g) = 5 stat(g) = mul
prec(pair) = 0 stat(pair) = lex
prec(+) = 3 stat(+) = mul

π(f) = [1]
π(0) = []
π(s) = [1]
π(p) = 1
π(h) = [1]
π(g) = [1]
π(pair) = [2,1]
π(+) = [1,2]
π(q) = 1

all of the following rules can be deleted.
f(0) 0 (1)
f(s(0)) s(0) (2)
f(s(s(x))) p(h(g(x))) (3)
g(0) pair(s(0),s(0)) (4)
g(s(x)) h(g(x)) (5)
h(x) pair(+(p(x),q(x)),p(x)) (6)
p(pair(x,y)) x (7)
q(pair(x,y)) y (8)
+(x,0) x (9)
+(x,s(y)) s(+(x,y)) (10)
f(s(s(x))) +(p(g(x)),q(g(x))) (11)
g(s(x)) pair(+(p(g(x)),q(g(x))),p(g(x))) (12)

1.1 R is empty

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