Certification Problem

Input (TPDB TRS_Innermost/Applicative_AG01_innermost/#4.26)

The rewrite relation of the following TRS is considered.

app(p,0) 0 (1)
app(p,app(s,x)) x (2)
app(app(le,0),y) true (3)
app(app(le,app(s,x)),0) false (4)
app(app(le,app(s,x)),app(s,y)) app(app(le,x),y) (5)
app(app(minus,x),y) app(app(app(if,app(app(le,x),y)),x),y) (6)
app(app(app(if,true),x),y) 0 (7)
app(app(app(if,false),x),y) app(s,app(app(minus,app(p,x)),y)) (8)
app(app(map,f),nil) nil (9)
app(app(map,f),app(app(cons,x),xs)) app(app(cons,app(f,x)),app(app(map,f),xs)) (10)
app(app(filter,f),nil) nil (11)
app(app(filter,f),app(app(cons,x),xs)) app(app(app(app(filter2,app(f,x)),f),x),xs) (12)
app(app(app(app(filter2,true),f),x),xs) app(app(cons,x),app(app(filter,f),xs)) (13)
app(app(app(app(filter2,false),f),x),xs) app(app(filter,f),xs) (14)
The evaluation strategy is innermost.

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)
0 is mapped to 0
s is mapped to s, s1(x1)
le is mapped to le, le1(x1), le2(x1, x2)
true is mapped to true
false is mapped to false
minus is mapped to minus, minus1(x1), minus2(x1, x2)
if is mapped to if, if1(x1), if2(x1, x2), if3(x1, x2, x3)
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)


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(0) 0 (34)
p1(s1(x)) x (35)
le2(0,y) true (36)
le2(s1(x),0) false (37)
le2(s1(x),s1(y)) le2(x,y) (38)
minus2(x,y) if3(le2(x,y),x,y) (39)
if3(true,x,y) 0 (40)
if3(false,x,y) s1(minus2(p1(x),y)) (41)
map2(f,nil) nil (42)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (43)
filter3(f,nil) nil (44)
filter3(f,cons2(x,xs)) filter24(app(f,x),f,x,xs) (45)
filter24(true,f,x,xs) cons2(x,filter3(f,xs)) (46)
filter24(false,f,x,xs) filter3(f,xs) (47)
app(p,y1) p1(y1) (15)
app(s,y1) s1(y1) (16)
app(le,y1) le1(y1) (17)
app(le1(x0),y1) le2(x0,y1) (18)
app(minus,y1) minus1(y1) (19)
app(minus1(x0),y1) minus2(x0,y1) (20)
app(if,y1) if1(y1) (21)
app(if1(x0),y1) if2(x0,y1) (22)
app(if2(x0,x1),y1) if3(x0,x1,y1) (23)
app(map,y1) map1(y1) (24)
app(map1(x0),y1) map2(x0,y1) (25)
app(cons,y1) cons1(y1) (26)
app(cons1(x0),y1) cons2(x0,y1) (27)
app(filter,y1) filter1(y1) (28)
app(filter1(x0),y1) filter3(x0,y1) (29)
app(filter2,y1) filter21(y1) (30)
app(filter21(x0),y1) filter22(x0,y1) (31)
app(filter22(x0,x1),y1) filter23(x0,x1,y1) (32)
app(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (33)

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.
le2#(s1(x),s1(y)) le2#(x,y) (48)
minus2#(x,y) if3#(le2(x,y),x,y) (49)
minus2#(x,y) le2#(x,y) (50)
if3#(false,x,y) minus2#(p1(x),y) (51)
if3#(false,x,y) p1#(x) (52)
map2#(f,cons2(x,xs)) app#(f,x) (53)
map2#(f,cons2(x,xs)) map2#(f,xs) (54)
filter3#(f,cons2(x,xs)) filter24#(app(f,x),f,x,xs) (55)
filter3#(f,cons2(x,xs)) app#(f,x) (56)
filter24#(true,f,x,xs) filter3#(f,xs) (57)
filter24#(false,f,x,xs) filter3#(f,xs) (58)
app#(p,y1) p1#(y1) (59)
app#(le1(x0),y1) le2#(x0,y1) (60)
app#(minus1(x0),y1) minus2#(x0,y1) (61)
app#(if2(x0,x1),y1) if3#(x0,x1,y1) (62)
app#(map1(x0),y1) map2#(x0,y1) (63)
app#(filter1(x0),y1) filter3#(x0,y1) (64)
app#(filter23(x0,x1,x2),y1) filter24#(x0,x1,x2,y1) (65)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 3 components.