Certification Problem

Input (TPDB TRS_Standard/AotoYamada_05/007)

The rewrite relation of the following TRS is considered.

app(app(plus,0),y) y (1)
app(app(plus,app(s,x)),y) app(s,app(app(plus,x),y)) (2)
app(app(map,f),nil) nil (3)
app(app(map,f),app(app(cons,x),xs)) app(app(cons,app(f,x)),app(app(map,f),xs)) (4)
inc app(map,app(plus,app(s,0))) (5)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Uncurrying

We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.

plus is mapped to plus, plus1(x1), plus2(x1, x2)
0 is mapped to 0
s is mapped to s, s1(x1)
map is mapped to map, map1(x1), map2(x1, x2)
nil is mapped to nil
cons is mapped to cons, cons1(x1), cons2(x1, x2)
inc is mapped to inc


There are no uncurry rules.
No rules have to be added for the eta-expansion.

Uncurrying the rules and adding the uncurrying rules yields the new set of rules
plus2(0,y) y (13)
plus2(s1(x),y) s1(plus2(x,y)) (14)
map2(f,nil) nil (15)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (16)
inc map1(plus1(s1(0))) (17)
app(plus,y1) plus1(y1) (6)
app(plus1(x0),y1) plus2(x0,y1) (7)
app(s,y1) s1(y1) (8)
app(map,y1) map1(y1) (9)
app(map1(x0),y1) map2(x0,y1) (10)
app(cons,y1) cons1(y1) (11)
app(cons1(x0),y1) cons2(x0,y1) (12)

1.1 Rule Removal

Using the
prec(plus2) = 1 stat(plus2) = mul
prec(0) = 2 stat(0) = mul
prec(map2) = 1 stat(map2) = mul
prec(nil) = 3 stat(nil) = mul
prec(cons2) = 0 stat(cons2) = mul
prec(app) = 1 stat(app) = mul
prec(inc) = 4 stat(inc) = mul
prec(map1) = 1 stat(map1) = mul
prec(plus1) = 0 stat(plus1) = mul
prec(plus) = 0 stat(plus) = mul
prec(s) = 5 stat(s) = mul
prec(map) = 6 stat(map) = mul
prec(cons) = 0 stat(cons) = mul
prec(cons1) = 0 stat(cons1) = mul

π(plus2) = [1,2]
π(0) = []
π(s1) = 1
π(map2) = [1,2]
π(nil) = []
π(cons2) = [1,2]
π(app) = [1,2]
π(inc) = []
π(map1) = [1]
π(plus1) = [1]
π(plus) = []
π(s) = []
π(map) = []
π(cons) = []
π(cons1) = [1]

all of the following rules can be deleted.
plus2(0,y) y (13)
map2(f,nil) nil (15)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (16)
inc map1(plus1(s1(0))) (17)
app(plus,y1) plus1(y1) (6)
app(plus1(x0),y1) plus2(x0,y1) (7)
app(s,y1) s1(y1) (8)
app(map,y1) map1(y1) (9)
app(map1(x0),y1) map2(x0,y1) (10)
app(cons,y1) cons1(y1) (11)
app(cons1(x0),y1) cons2(x0,y1) (12)

1.1.1 Rule Removal

Using the Knuth Bendix order with w0 = 1 and the following precedence and weight functions
prec(s1) = 0 weight(s1) = 1
prec(plus2) = 1 weight(plus2) = 0
all of the following rules can be deleted.
plus2(s1(x),y) s1(plus2(x,y)) (14)

1.1.1.1 R is empty

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