Certification Problem

Input (TPDB TRS_Standard/Applicative_first_order_05/21)

The rewrite relation of the following TRS is considered.

app(p,app(s,x)) x (1)
app(fact,0) app(s,0) (2)
app(fact,app(s,x)) app(app(*,app(s,x)),app(fact,app(p,app(s,x)))) (3)
app(app(*,0),y) 0 (4)
app(app(*,app(s,x)),y) app(app(+,app(app(*,x),y)),y) (5)
app(app(+,x),0) x (6)
app(app(+,x),app(s,y)) app(s,app(app(+,x),y)) (7)
app(app(map,f),nil) nil (8)
app(app(map,f),app(app(cons,x),xs)) app(app(cons,app(f,x)),app(app(map,f),xs)) (9)
app(app(filter,f),nil) nil (10)
app(app(filter,f),app(app(cons,x),xs)) app(app(app(app(filter2,app(f,x)),f),x),xs) (11)
app(app(app(app(filter2,true),f),x),xs) app(app(cons,x),app(app(filter,f),xs)) (12)
app(app(app(app(filter2,false),f),x),xs) app(app(filter,f),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.

p is mapped to p, p1(x1)
s is mapped to s, s1(x1)
fact is mapped to fact, fact1(x1)
0 is mapped to 0
* is mapped to *, *1(x1), *2(x1, x2)
+ is mapped to +, +1(x1), +2(x1, x2)
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)
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
p1(s1(x)) x (31)
fact1(0) s1(0) (32)
fact1(s1(x)) *2(s1(x),fact1(p1(s1(x)))) (33)
*2(0,y) 0 (34)
*2(s1(x),y) +2(*2(x,y),y) (35)
+2(x,0) x (36)
+2(x,s1(y)) s1(+2(x,y)) (37)
map2(f,nil) nil (38)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (39)
filter3(f,nil) nil (40)
filter3(f,cons2(x,xs)) filter24(app(f,x),f,x,xs) (41)
filter24(true,f,x,xs) cons2(x,filter3(f,xs)) (42)
filter24(false,f,x,xs) filter3(f,xs) (43)
app(p,y1) p1(y1) (14)
app(s,y1) s1(y1) (15)
app(fact,y1) fact1(y1) (16)
app(*,y1) *1(y1) (17)
app(*1(x0),y1) *2(x0,y1) (18)
app(+,y1) +1(y1) (19)
app(+1(x0),y1) +2(x0,y1) (20)
app(map,y1) map1(y1) (21)
app(map1(x0),y1) map2(x0,y1) (22)
app(cons,y1) cons1(y1) (23)
app(cons1(x0),y1) cons2(x0,y1) (24)
app(filter,y1) filter1(y1) (25)
app(filter1(x0),y1) filter3(x0,y1) (26)
app(filter2,y1) filter21(y1) (27)
app(filter21(x0),y1) filter22(x0,y1) (28)
app(filter22(x0,x1),y1) filter23(x0,x1,y1) (29)
app(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (30)

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.
fact1#(s1(x)) *2#(s1(x),fact1(p1(s1(x)))) (44)
fact1#(s1(x)) fact1#(p1(s1(x))) (45)
fact1#(s1(x)) p1#(s1(x)) (46)
*2#(s1(x),y) +2#(*2(x,y),y) (47)
*2#(s1(x),y) *2#(x,y) (48)
+2#(x,s1(y)) +2#(x,y) (49)
map2#(f,cons2(x,xs)) app#(f,x) (50)
map2#(f,cons2(x,xs)) map2#(f,xs) (51)
filter3#(f,cons2(x,xs)) filter24#(app(f,x),f,x,xs) (52)
filter3#(f,cons2(x,xs)) app#(f,x) (53)
filter24#(true,f,x,xs) filter3#(f,xs) (54)
filter24#(false,f,x,xs) filter3#(f,xs) (55)
app#(p,y1) p1#(y1) (56)
app#(fact,y1) fact1#(y1) (57)
app#(*1(x0),y1) *2#(x0,y1) (58)
app#(+1(x0),y1) +2#(x0,y1) (59)
app#(map1(x0),y1) map2#(x0,y1) (60)
app#(filter1(x0),y1) filter3#(x0,y1) (61)
app#(filter23(x0,x1,x2),y1) filter24#(x0,x1,x2,y1) (62)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 4 components.