Certification Problem

Input (TPDB TRS_Standard/Applicative_first_order_05/#3.10)

The rewrite relation of the following TRS is considered.

app'(app'(eq,0),0) true (1)
app'(app'(eq,0),app'(s,x)) false (2)
app'(app'(eq,app'(s,x)),0) false (3)
app'(app'(eq,app'(s,x)),app'(s,y)) app'(app'(eq,x),y) (4)
app'(app'(le,0),y) true (5)
app'(app'(le,app'(s,x)),0) false (6)
app'(app'(le,app'(s,x)),app'(s,y)) app'(app'(le,x),y) (7)
app'(app'(app,nil),y) y (8)
app'(app'(app,app'(app'(add,n),x)),y) app'(app'(add,n),app'(app'(app,x),y)) (9)
app'(min,app'(app'(add,n),nil)) n (10)
app'(min,app'(app'(add,n),app'(app'(add,m),x))) app'(app'(if_min,app'(app'(le,n),m)),app'(app'(add,n),app'(app'(add,m),x))) (11)
app'(app'(if_min,true),app'(app'(add,n),app'(app'(add,m),x))) app'(min,app'(app'(add,n),x)) (12)
app'(app'(if_min,false),app'(app'(add,n),app'(app'(add,m),x))) app'(min,app'(app'(add,m),x)) (13)
app'(app'(rm,n),nil) nil (14)
app'(app'(rm,n),app'(app'(add,m),x)) app'(app'(app'(if_rm,app'(app'(eq,n),m)),n),app'(app'(add,m),x)) (15)
app'(app'(app'(if_rm,true),n),app'(app'(add,m),x)) app'(app'(rm,n),x) (16)
app'(app'(app'(if_rm,false),n),app'(app'(add,m),x)) app'(app'(add,m),app'(app'(rm,n),x)) (17)
app'(app'(minsort,nil),nil) nil (18)
app'(app'(minsort,app'(app'(add,n),x)),y) app'(app'(app'(if_minsort,app'(app'(eq,n),app'(min,app'(app'(add,n),x)))),app'(app'(add,n),x)),y) (19)
app'(app'(app'(if_minsort,true),app'(app'(add,n),x)),y) app'(app'(add,n),app'(app'(minsort,app'(app'(app,app'(app'(rm,n),x)),y)),nil)) (20)
app'(app'(app'(if_minsort,false),app'(app'(add,n),x)),y) app'(app'(minsort,x),app'(app'(add,n),y)) (21)
app'(app'(map,f),nil) nil (22)
app'(app'(map,f),app'(app'(add,x),xs)) app'(app'(add,app'(f,x)),app'(app'(map,f),xs)) (23)
app'(app'(filter,f),nil) nil (24)
app'(app'(filter,f),app'(app'(add,x),xs)) app'(app'(app'(app'(filter2,app'(f,x)),f),x),xs) (25)
app'(app'(app'(app'(filter2,true),f),x),xs) app'(app'(add,x),app'(app'(filter,f),xs)) (26)
app'(app'(app'(app'(filter2,false),f),x),xs) app'(app'(filter,f),xs) (27)

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.

eq is mapped to eq, eq1(x1), eq2(x1, x2)
0 is mapped to 0
true is mapped to true
s is mapped to s, s1(x1)
false is mapped to false
le is mapped to le, le1(x1), le2(x1, x2)
app is mapped to app, app1(x1), app2(x1, x2)
nil is mapped to nil
add is mapped to add, add1(x1), add2(x1, x2)
min is mapped to min, min1(x1)
if_min is mapped to if_min, if_min1(x1), if_min2(x1, x2)
rm is mapped to rm, rm1(x1), rm2(x1, x2)
if_rm is mapped to if_rm, if_rm1(x1), if_rm2(x1, x2), if_rm3(x1, x2, x3)
minsort is mapped to minsort, minsort1(x1), minsort2(x1, x2)
if_minsort is mapped to if_minsort, if_minsort1(x1), if_minsort2(x1, x2), if_minsort3(x1, x2, x3)
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)


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
eq2(0,0) true (58)
eq2(0,s1(x)) false (59)
eq2(s1(x),0) false (60)
eq2(s1(x),s1(y)) eq2(x,y) (61)
le2(0,y) true (62)
le2(s1(x),0) false (63)
le2(s1(x),s1(y)) le2(x,y) (64)
app2(nil,y) y (65)
app2(add2(n,x),y) add2(n,app2(x,y)) (66)
min1(add2(n,nil)) n (67)
min1(add2(n,add2(m,x))) if_min2(le2(n,m),add2(n,add2(m,x))) (68)
if_min2(true,add2(n,add2(m,x))) min1(add2(n,x)) (69)
if_min2(false,add2(n,add2(m,x))) min1(add2(m,x)) (70)
rm2(n,nil) nil (71)
rm2(n,add2(m,x)) if_rm3(eq2(n,m),n,add2(m,x)) (72)
if_rm3(true,n,add2(m,x)) rm2(n,x) (73)
if_rm3(false,n,add2(m,x)) add2(m,rm2(n,x)) (74)
minsort2(nil,nil) nil (75)
minsort2(add2(n,x),y) if_minsort3(eq2(n,min1(add2(n,x))),add2(n,x),y) (76)
if_minsort3(true,add2(n,x),y) add2(n,minsort2(app2(rm2(n,x),y),nil)) (77)
if_minsort3(false,add2(n,x),y) minsort2(x,add2(n,y)) (78)
map2(f,nil) nil (79)
map2(f,add2(x,xs)) add2(app'(f,x),map2(f,xs)) (80)
filter3(f,nil) nil (81)
filter3(f,add2(x,xs)) filter24(app'(f,x),f,x,xs) (82)
filter24(true,f,x,xs) add2(x,filter3(f,xs)) (83)
filter24(false,f,x,xs) filter3(f,xs) (84)
app'(eq,y1) eq1(y1) (28)
app'(eq1(x0),y1) eq2(x0,y1) (29)
app'(s,y1) s1(y1) (30)
app'(le,y1) le1(y1) (31)
app'(le1(x0),y1) le2(x0,y1) (32)
app'(app,y1) app1(y1) (33)
app'(app1(x0),y1) app2(x0,y1) (34)
app'(add,y1) add1(y1) (35)
app'(add1(x0),y1) add2(x0,y1) (36)
app'(min,y1) min1(y1) (37)
app'(if_min,y1) if_min1(y1) (38)
app'(if_min1(x0),y1) if_min2(x0,y1) (39)
app'(rm,y1) rm1(y1) (40)
app'(rm1(x0),y1) rm2(x0,y1) (41)
app'(if_rm,y1) if_rm1(y1) (42)
app'(if_rm1(x0),y1) if_rm2(x0,y1) (43)
app'(if_rm2(x0,x1),y1) if_rm3(x0,x1,y1) (44)
app'(minsort,y1) minsort1(y1) (45)
app'(minsort1(x0),y1) minsort2(x0,y1) (46)
app'(if_minsort,y1) if_minsort1(y1) (47)
app'(if_minsort1(x0),y1) if_minsort2(x0,y1) (48)
app'(if_minsort2(x0,x1),y1) if_minsort3(x0,x1,y1) (49)
app'(map,y1) map1(y1) (50)
app'(map1(x0),y1) map2(x0,y1) (51)
app'(filter,y1) filter1(y1) (52)
app'(filter1(x0),y1) filter3(x0,y1) (53)
app'(filter2,y1) filter21(y1) (54)
app'(filter21(x0),y1) filter22(x0,y1) (55)
app'(filter22(x0,x1),y1) filter23(x0,x1,y1) (56)
app'(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (57)

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.
eq2#(s1(x),s1(y)) eq2#(x,y) (85)
le2#(s1(x),s1(y)) le2#(x,y) (86)
app2#(add2(n,x),y) app2#(x,y) (87)
min1#(add2(n,add2(m,x))) if_min2#(le2(n,m),add2(n,add2(m,x))) (88)
min1#(add2(n,add2(m,x))) le2#(n,m) (89)
if_min2#(true,add2(n,add2(m,x))) min1#(add2(n,x)) (90)
if_min2#(false,add2(n,add2(m,x))) min1#(add2(m,x)) (91)
rm2#(n,add2(m,x)) if_rm3#(eq2(n,m),n,add2(m,x)) (92)
rm2#(n,add2(m,x)) eq2#(n,m) (93)
if_rm3#(true,n,add2(m,x)) rm2#(n,x) (94)
if_rm3#(false,n,add2(m,x)) rm2#(n,x) (95)
minsort2#(add2(n,x),y) if_minsort3#(eq2(n,min1(add2(n,x))),add2(n,x),y) (96)
minsort2#(add2(n,x),y) eq2#(n,min1(add2(n,x))) (97)
minsort2#(add2(n,x),y) min1#(add2(n,x)) (98)
if_minsort3#(true,add2(n,x),y) minsort2#(app2(rm2(n,x),y),nil) (99)
if_minsort3#(true,add2(n,x),y) app2#(rm2(n,x),y) (100)
if_minsort3#(true,add2(n,x),y) rm2#(n,x) (101)
if_minsort3#(false,add2(n,x),y) minsort2#(x,add2(n,y)) (102)
map2#(f,add2(x,xs)) app'#(f,x) (103)
map2#(f,add2(x,xs)) map2#(f,xs) (104)
filter3#(f,add2(x,xs)) filter24#(app'(f,x),f,x,xs) (105)
filter3#(f,add2(x,xs)) app'#(f,x) (106)
filter24#(true,f,x,xs) filter3#(f,xs) (107)
filter24#(false,f,x,xs) filter3#(f,xs) (108)
app'#(eq1(x0),y1) eq2#(x0,y1) (109)
app'#(le1(x0),y1) le2#(x0,y1) (110)
app'#(app1(x0),y1) app2#(x0,y1) (111)
app'#(min,y1) min1#(y1) (112)
app'#(if_min1(x0),y1) if_min2#(x0,y1) (113)
app'#(rm1(x0),y1) rm2#(x0,y1) (114)
app'#(if_rm2(x0,x1),y1) if_rm3#(x0,x1,y1) (115)
app'#(minsort1(x0),y1) minsort2#(x0,y1) (116)
app'#(if_minsort2(x0,x1),y1) if_minsort3#(x0,x1,y1) (117)
app'#(map1(x0),y1) map2#(x0,y1) (118)
app'#(filter1(x0),y1) filter3#(x0,y1) (119)
app'#(filter23(x0,x1,x2),y1) filter24#(x0,x1,x2,y1) (120)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 7 components.