Certification Problem

Input (TPDB TRS_Innermost/Applicative_AG01_innermost/#4.28)

The rewrite relation of the following TRS is considered.

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

half is mapped to half, half1(x1)
0 is mapped to 0
s is mapped to s, s1(x1)
bits is mapped to bits, bits1(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)
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
half1(0) 0 (25)
half1(s1(0)) 0 (26)
half1(s1(s1(x))) s1(half1(x)) (27)
bits1(0) 0 (28)
bits1(s1(x)) s1(bits1(half1(s1(x)))) (29)
map2(f,nil) nil (30)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (31)
filter3(f,nil) nil (32)
filter3(f,cons2(x,xs)) filter24(app(f,x),f,x,xs) (33)
filter24(true,f,x,xs) cons2(x,filter3(f,xs)) (34)
filter24(false,f,x,xs) filter3(f,xs) (35)
app(half,y1) half1(y1) (12)
app(s,y1) s1(y1) (13)
app(bits,y1) bits1(y1) (14)
app(map,y1) map1(y1) (15)
app(map1(x0),y1) map2(x0,y1) (16)
app(cons,y1) cons1(y1) (17)
app(cons1(x0),y1) cons2(x0,y1) (18)
app(filter,y1) filter1(y1) (19)
app(filter1(x0),y1) filter3(x0,y1) (20)
app(filter2,y1) filter21(y1) (21)
app(filter21(x0),y1) filter22(x0,y1) (22)
app(filter22(x0,x1),y1) filter23(x0,x1,y1) (23)
app(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (24)

1.1 Rule Removal

Using the
prec(0) = 1 stat(0) = mul
prec(bits1) = 0 stat(bits1) = mul
prec(map2) = 6 stat(map2) = lex
prec(nil) = 7 stat(nil) = mul
prec(cons2) = 2 stat(cons2) = mul
prec(app) = 6 stat(app) = lex
prec(filter3) = 6 stat(filter3) = lex
prec(filter24) = 6 stat(filter24) = lex
prec(true) = 8 stat(true) = mul
prec(false) = 9 stat(false) = mul
prec(half) = 10 stat(half) = mul
prec(s) = 11 stat(s) = mul
prec(bits) = 0 stat(bits) = mul
prec(map) = 12 stat(map) = mul
prec(map1) = 3 stat(map1) = lex
prec(cons) = 13 stat(cons) = mul
prec(filter) = 14 stat(filter) = mul
prec(filter1) = 6 stat(filter1) = lex
prec(filter2) = 15 stat(filter2) = mul
prec(filter22) = 4 stat(filter22) = mul
prec(filter23) = 5 stat(filter23) = lex

π(half1) = 1
π(0) = []
π(s1) = 1
π(bits1) = [1]
π(map2) = [2,1]
π(nil) = []
π(cons2) = [1,2]
π(app) = [2,1]
π(filter3) = [2,1]
π(filter24) = [4,2,1,3]
π(true) = []
π(false) = []
π(half) = []
π(s) = []
π(bits) = []
π(map) = []
π(map1) = [1]
π(cons) = []
π(cons1) = 1
π(filter) = []
π(filter1) = [1]
π(filter2) = []
π(filter21) = 1
π(filter22) = [1,2]
π(filter23) = [3,2,1]

all of the following rules can be deleted.
bits1(0) 0 (28)
map2(f,nil) nil (30)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (31)
filter3(f,nil) nil (32)
filter3(f,cons2(x,xs)) filter24(app(f,x),f,x,xs) (33)
filter24(true,f,x,xs) cons2(x,filter3(f,xs)) (34)
filter24(false,f,x,xs) filter3(f,xs) (35)
app(half,y1) half1(y1) (12)
app(s,y1) s1(y1) (13)
app(bits,y1) bits1(y1) (14)
app(map,y1) map1(y1) (15)
app(map1(x0),y1) map2(x0,y1) (16)
app(cons,y1) cons1(y1) (17)
app(cons1(x0),y1) cons2(x0,y1) (18)
app(filter,y1) filter1(y1) (19)
app(filter1(x0),y1) filter3(x0,y1) (20)
app(filter2,y1) filter21(y1) (21)
app(filter21(x0),y1) filter22(x0,y1) (22)
app(filter22(x0,x1),y1) filter23(x0,x1,y1) (23)
app(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (24)

1.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.1 Dependency Pair Transformation

The following set of initial dependency pairs has been identified.
half1#(s1(s1(x))) half1#(x) (36)
bits1#(s1(x)) bits1#(half1(s1(x))) (37)
bits1#(s1(x)) half1#(s1(x)) (38)

1.1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 2 components.