Certification Problem

Input (TPDB TRS_Standard/Applicative_first_order_05/#3.57)

The rewrite relation of the following TRS is considered.

app'(app'(minus,x),0) x (1)
app'(app'(minus,app'(s,x)),app'(s,y)) app'(app'(minus,x),y) (2)
app'(app'(minus,app'(app'(minus,x),y)),z) app'(app'(minus,x),app'(app'(plus,y),z)) (3)
app'(app'(quot,0),app'(s,y)) 0 (4)
app'(app'(quot,app'(s,x)),app'(s,y)) app'(s,app'(app'(quot,app'(app'(minus,x),y)),app'(s,y))) (5)
app'(app'(plus,0),y) y (6)
app'(app'(plus,app'(s,x)),y) app'(s,app'(app'(plus,x),y)) (7)
app'(app'(app,nil),k) k (8)
app'(app'(app,l),nil) l (9)
app'(app'(app,app'(app'(cons,x),l)),k) app'(app'(cons,x),app'(app'(app,l),k)) (10)
app'(sum,app'(app'(cons,x),nil)) app'(app'(cons,x),nil) (11)
app'(sum,app'(app'(cons,x),app'(app'(cons,y),l))) app'(sum,app'(app'(cons,app'(app'(plus,x),y)),l)) (12)
app'(sum,app'(app'(app,l),app'(app'(cons,x),app'(app'(cons,y),k)))) app'(sum,app'(app'(app,l),app'(sum,app'(app'(cons,x),app'(app'(cons,y),k))))) (13)
app'(app'(map,f),nil) nil (14)
app'(app'(map,f),app'(app'(cons,x),xs)) app'(app'(cons,app'(f,x)),app'(app'(map,f),xs)) (15)
app'(app'(filter,f),nil) nil (16)
app'(app'(filter,f),app'(app'(cons,x),xs)) app'(app'(app'(app'(filter2,app'(f,x)),f),x),xs) (17)
app'(app'(app'(app'(filter2,true),f),x),xs) app'(app'(cons,x),app'(app'(filter,f),xs)) (18)
app'(app'(app'(app'(filter2,false),f),x),xs) app'(app'(filter,f),xs) (19)

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.

minus is mapped to minus, minus1(x1), minus2(x1, x2)
0 is mapped to 0
s is mapped to s, s1(x1)
plus is mapped to plus, plus1(x1), plus2(x1, x2)
quot is mapped to quot, quot1(x1), quot2(x1, x2)
app is mapped to app, app1(x1), app2(x1, x2)
nil is mapped to nil
cons is mapped to cons, cons1(x1), cons2(x1, x2)
sum is mapped to sum, sum1(x1)
map is mapped to map, map1(x1), map2(x1, x2)
filter is mapped to filter, filter1(x1), filter3(x1, x2)
filter2 is mapped to filter2, filter21(x1), filter22(x1, x2), filter23(x1, x2, x3), filter24(x1,...,x4)
true is mapped to true
false is mapped to false


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
minus2(x,0) x (40)
minus2(s1(x),s1(y)) minus2(x,y) (41)
minus2(minus2(x,y),z) minus2(x,plus2(y,z)) (42)
quot2(0,s1(y)) 0 (43)
quot2(s1(x),s1(y)) s1(quot2(minus2(x,y),s1(y))) (44)
plus2(0,y) y (45)
plus2(s1(x),y) s1(plus2(x,y)) (46)
app2(nil,k) k (47)
app2(l,nil) l (48)
app2(cons2(x,l),k) cons2(x,app2(l,k)) (49)
sum1(cons2(x,nil)) cons2(x,nil) (50)
sum1(cons2(x,cons2(y,l))) sum1(cons2(plus2(x,y),l)) (51)
sum1(app2(l,cons2(x,cons2(y,k)))) sum1(app2(l,sum1(cons2(x,cons2(y,k))))) (52)
map2(f,nil) nil (53)
map2(f,cons2(x,xs)) cons2(app'(f,x),map2(f,xs)) (54)
filter3(f,nil) nil (55)
filter3(f,cons2(x,xs)) filter24(app'(f,x),f,x,xs) (56)
filter24(true,f,x,xs) cons2(x,filter3(f,xs)) (57)
filter24(false,f,x,xs) filter3(f,xs) (58)
app'(minus,y1) minus1(y1) (20)
app'(minus1(x0),y1) minus2(x0,y1) (21)
app'(s,y1) s1(y1) (22)
app'(plus,y1) plus1(y1) (23)
app'(plus1(x0),y1) plus2(x0,y1) (24)
app'(quot,y1) quot1(y1) (25)
app'(quot1(x0),y1) quot2(x0,y1) (26)
app'(app,y1) app1(y1) (27)
app'(app1(x0),y1) app2(x0,y1) (28)
app'(cons,y1) cons1(y1) (29)
app'(cons1(x0),y1) cons2(x0,y1) (30)
app'(sum,y1) sum1(y1) (31)
app'(map,y1) map1(y1) (32)
app'(map1(x0),y1) map2(x0,y1) (33)
app'(filter,y1) filter1(y1) (34)
app'(filter1(x0),y1) filter3(x0,y1) (35)
app'(filter2,y1) filter21(y1) (36)
app'(filter21(x0),y1) filter22(x0,y1) (37)
app'(filter22(x0,x1),y1) filter23(x0,x1,y1) (38)
app'(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (39)

1.1 Dependency Pair Transformation

The following set of initial dependency pairs has been identified.
minus2#(s1(x),s1(y)) minus2#(x,y) (59)
minus2#(minus2(x,y),z) minus2#(x,plus2(y,z)) (60)
minus2#(minus2(x,y),z) plus2#(y,z) (61)
quot2#(s1(x),s1(y)) quot2#(minus2(x,y),s1(y)) (62)
quot2#(s1(x),s1(y)) minus2#(x,y) (63)
plus2#(s1(x),y) plus2#(x,y) (64)
app2#(cons2(x,l),k) app2#(l,k) (65)
sum1#(cons2(x,cons2(y,l))) sum1#(cons2(plus2(x,y),l)) (66)
sum1#(cons2(x,cons2(y,l))) plus2#(x,y) (67)
sum1#(app2(l,cons2(x,cons2(y,k)))) sum1#(app2(l,sum1(cons2(x,cons2(y,k))))) (68)
sum1#(app2(l,cons2(x,cons2(y,k)))) app2#(l,sum1(cons2(x,cons2(y,k)))) (69)
sum1#(app2(l,cons2(x,cons2(y,k)))) sum1#(cons2(x,cons2(y,k))) (70)
map2#(f,cons2(x,xs)) app'#(f,x) (71)
map2#(f,cons2(x,xs)) map2#(f,xs) (72)
filter3#(f,cons2(x,xs)) filter24#(app'(f,x),f,x,xs) (73)
filter3#(f,cons2(x,xs)) app'#(f,x) (74)
filter24#(true,f,x,xs) filter3#(f,xs) (75)
filter24#(false,f,x,xs) filter3#(f,xs) (76)
app'#(minus1(x0),y1) minus2#(x0,y1) (77)
app'#(plus1(x0),y1) plus2#(x0,y1) (78)
app'#(quot1(x0),y1) quot2#(x0,y1) (79)
app'#(app1(x0),y1) app2#(x0,y1) (80)
app'#(sum,y1) sum1#(y1) (81)
app'#(map1(x0),y1) map2#(x0,y1) (82)
app'#(filter1(x0),y1) filter3#(x0,y1) (83)
app'#(filter23(x0,x1,x2),y1) filter24#(x0,x1,x2,y1) (84)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 7 components.