Certification Problem

Input (TPDB TRS_Standard/Applicative_05/Ex7_9)

The rewrite relation of the following TRS is considered.

app(app(app(if,true),xs),ys) xs (1)
app(app(app(if,false),xs),ys) ys (2)
app(app(sub,x),0) x (3)
app(app(sub,app(s,x)),app(s,y)) app(app(sub,x),y) (4)
app(app(gtr,0),y) false (5)
app(app(gtr,app(s,x)),0) true (6)
app(app(gtr,app(s,x)),app(s,y)) app(app(gtr,x),y) (7)
app(app(d,x),0) true (8)
app(app(d,app(s,x)),app(s,y)) app(app(app(if,app(app(gtr,x),y)),false),app(app(d,app(s,x)),app(app(sub,y),x))) (9)
app(len,nil) 0 (10)
app(len,app(app(cons,x),xs)) app(s,app(len,xs)) (11)
app(app(filter,p),nil) nil (12)
app(app(filter,p),app(app(cons,x),xs)) app(app(app(if,app(p,x)),app(app(cons,x),app(app(filter,p),xs))),app(app(filter,p),xs)) (13)

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.

if is mapped to if, if1(x1), if2(x1, x2), if3(x1, x2, x3)
true is mapped to true
false is mapped to false
sub is mapped to sub, sub1(x1), sub2(x1, x2)
0 is mapped to 0
s is mapped to s, s1(x1)
gtr is mapped to gtr, gtr1(x1), gtr2(x1, x2)
d is mapped to d, d1(x1), d2(x1, x2)
len is mapped to len, len1(x1)
nil is mapped to nil
cons is mapped to cons, cons1(x1), cons2(x1, x2)
filter is mapped to filter, filter1(x1), filter2(x1, x2)


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
if3(true,xs,ys) xs (29)
if3(false,xs,ys) ys (30)
sub2(x,0) x (31)
sub2(s1(x),s1(y)) sub2(x,y) (32)
gtr2(0,y) false (33)
gtr2(s1(x),0) true (34)
gtr2(s1(x),s1(y)) gtr2(x,y) (35)
d2(x,0) true (36)
d2(s1(x),s1(y)) if3(gtr2(x,y),false,d2(s1(x),sub2(y,x))) (37)
len1(nil) 0 (38)
len1(cons2(x,xs)) s1(len1(xs)) (39)
filter2(p,nil) nil (40)
filter2(p,cons2(x,xs)) if3(app(p,x),cons2(x,filter2(p,xs)),filter2(p,xs)) (41)
app(if,y1) if1(y1) (14)
app(if1(x0),y1) if2(x0,y1) (15)
app(if2(x0,x1),y1) if3(x0,x1,y1) (16)
app(sub,y1) sub1(y1) (17)
app(sub1(x0),y1) sub2(x0,y1) (18)
app(s,y1) s1(y1) (19)
app(gtr,y1) gtr1(y1) (20)
app(gtr1(x0),y1) gtr2(x0,y1) (21)
app(d,y1) d1(y1) (22)
app(d1(x0),y1) d2(x0,y1) (23)
app(len,y1) len1(y1) (24)
app(cons,y1) cons1(y1) (25)
app(cons1(x0),y1) cons2(x0,y1) (26)
app(filter,y1) filter1(y1) (27)
app(filter1(x0),y1) filter2(x0,y1) (28)

1.1 Switch to Innermost Termination

The TRS is overlay and locally confluent:

10

Hence, it suffices to show innermost termination in the following.

1.1.1 Dependency Pair Transformation

The following set of initial dependency pairs has been identified.
sub2#(s1(x),s1(y)) sub2#(x,y) (42)
gtr2#(s1(x),s1(y)) gtr2#(x,y) (43)
d2#(s1(x),s1(y)) if3#(gtr2(x,y),false,d2(s1(x),sub2(y,x))) (44)
d2#(s1(x),s1(y)) gtr2#(x,y) (45)
d2#(s1(x),s1(y)) d2#(s1(x),sub2(y,x)) (46)
d2#(s1(x),s1(y)) sub2#(y,x) (47)
len1#(cons2(x,xs)) len1#(xs) (48)
filter2#(p,cons2(x,xs)) if3#(app(p,x),cons2(x,filter2(p,xs)),filter2(p,xs)) (49)
filter2#(p,cons2(x,xs)) app#(p,x) (50)
filter2#(p,cons2(x,xs)) filter2#(p,xs) (51)
app#(if2(x0,x1),y1) if3#(x0,x1,y1) (52)
app#(sub1(x0),y1) sub2#(x0,y1) (53)
app#(gtr1(x0),y1) gtr2#(x0,y1) (54)
app#(d1(x0),y1) d2#(x0,y1) (55)
app#(len,y1) len1#(y1) (56)
app#(filter1(x0),y1) filter2#(x0,y1) (57)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 5 components.