Certification Problem

Input (TPDB TRS_Standard/Applicative_first_order_05/#3.13)

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(or,true),y) true (5)
app(app(or,false),y) y (6)
app(app(union,empty),h) h (7)
app(app(union,app(app(app(edge,x),y),i)),h) app(app(app(edge,x),y),app(app(union,i),h)) (8)
app(app(app(app(reach,x),y),empty),h) false (9)
app(app(app(app(reach,x),y),app(app(app(edge,u),v),i)),h) app(app(app(app(app(if_reach_1,app(app(eq,x),u)),x),y),app(app(app(edge,u),v),i)),h) (10)
app(app(app(app(app(if_reach_1,true),x),y),app(app(app(edge,u),v),i)),h) app(app(app(app(app(if_reach_2,app(app(eq,y),v)),x),y),app(app(app(edge,u),v),i)),h) (11)
app(app(app(app(app(if_reach_1,false),x),y),app(app(app(edge,u),v),i)),h) app(app(app(app(reach,x),y),i),app(app(app(edge,u),v),h)) (12)
app(app(app(app(app(if_reach_2,true),x),y),app(app(app(edge,u),v),i)),h) true (13)
app(app(app(app(app(if_reach_2,false),x),y),app(app(app(edge,u),v),i)),h) app(app(or,app(app(app(app(reach,x),y),i),h)),app(app(app(app(reach,v),y),app(app(union,i),h)),empty)) (14)
app(app(map,f),nil) nil (15)
app(app(map,f),app(app(cons,x),xs)) app(app(cons,app(f,x)),app(app(map,f),xs)) (16)
app(app(filter,f),nil) nil (17)
app(app(filter,f),app(app(cons,x),xs)) app(app(app(app(filter2,app(f,x)),f),x),xs) (18)
app(app(app(app(filter2,true),f),x),xs) app(app(cons,x),app(app(filter,f),xs)) (19)
app(app(app(app(filter2,false),f),x),xs) app(app(filter,f),xs) (20)

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
or is mapped to or, or1(x1), or2(x1, x2)
union is mapped to union, union1(x1), union2(x1, x2)
empty is mapped to empty
edge is mapped to edge, edge1(x1), edge2(x1, x2), edge3(x1, x2, x3)
reach is mapped to reach, reach1(x1), reach2(x1, x2), reach3(x1, x2, x3), reach4(x1,...,x4)
if_reach_1 is mapped to if_reach_1, if_reach_11(x1), if_reach_12(x1, x2), if_reach_13(x1, x2, x3), if_reach_14(x1,...,x4), if_reach_15(x1,...,x5)
if_reach_2 is mapped to if_reach_2, if_reach_21(x1), if_reach_22(x1, x2), if_reach_23(x1, x2, x3), if_reach_24(x1,...,x4), if_reach_25(x1,...,x5)
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
eq2(0,0) true (55)
eq2(0,s1(x)) false (56)
eq2(s1(x),0) false (57)
eq2(s1(x),s1(y)) eq2(x,y) (58)
or2(true,y) true (59)
or2(false,y) y (60)
union2(empty,h) h (61)
union2(edge3(x,y,i),h) edge3(x,y,union2(i,h)) (62)
reach4(x,y,empty,h) false (63)
reach4(x,y,edge3(u,v,i),h) if_reach_15(eq2(x,u),x,y,edge3(u,v,i),h) (64)
if_reach_15(true,x,y,edge3(u,v,i),h) if_reach_25(eq2(y,v),x,y,edge3(u,v,i),h) (65)
if_reach_15(false,x,y,edge3(u,v,i),h) reach4(x,y,i,edge3(u,v,h)) (66)
if_reach_25(true,x,y,edge3(u,v,i),h) true (67)
if_reach_25(false,x,y,edge3(u,v,i),h) or2(reach4(x,y,i,h),reach4(v,y,union2(i,h),empty)) (68)
map2(f,nil) nil (69)
map2(f,cons2(x,xs)) cons2(app(f,x),map2(f,xs)) (70)
filter3(f,nil) nil (71)
filter3(f,cons2(x,xs)) filter24(app(f,x),f,x,xs) (72)
filter24(true,f,x,xs) cons2(x,filter3(f,xs)) (73)
filter24(false,f,x,xs) filter3(f,xs) (74)
app(eq,y1) eq1(y1) (21)
app(eq1(x0),y1) eq2(x0,y1) (22)
app(s,y1) s1(y1) (23)
app(or,y1) or1(y1) (24)
app(or1(x0),y1) or2(x0,y1) (25)
app(union,y1) union1(y1) (26)
app(union1(x0),y1) union2(x0,y1) (27)
app(edge,y1) edge1(y1) (28)
app(edge1(x0),y1) edge2(x0,y1) (29)
app(edge2(x0,x1),y1) edge3(x0,x1,y1) (30)
app(reach,y1) reach1(y1) (31)
app(reach1(x0),y1) reach2(x0,y1) (32)
app(reach2(x0,x1),y1) reach3(x0,x1,y1) (33)
app(reach3(x0,x1,x2),y1) reach4(x0,x1,x2,y1) (34)
app(if_reach_1,y1) if_reach_11(y1) (35)
app(if_reach_11(x0),y1) if_reach_12(x0,y1) (36)
app(if_reach_12(x0,x1),y1) if_reach_13(x0,x1,y1) (37)
app(if_reach_13(x0,x1,x2),y1) if_reach_14(x0,x1,x2,y1) (38)
app(if_reach_14(x0,x1,x2,x3),y1) if_reach_15(x0,x1,x2,x3,y1) (39)
app(if_reach_2,y1) if_reach_21(y1) (40)
app(if_reach_21(x0),y1) if_reach_22(x0,y1) (41)
app(if_reach_22(x0,x1),y1) if_reach_23(x0,x1,y1) (42)
app(if_reach_23(x0,x1,x2),y1) if_reach_24(x0,x1,x2,y1) (43)
app(if_reach_24(x0,x1,x2,x3),y1) if_reach_25(x0,x1,x2,x3,y1) (44)
app(map,y1) map1(y1) (45)
app(map1(x0),y1) map2(x0,y1) (46)
app(cons,y1) cons1(y1) (47)
app(cons1(x0),y1) cons2(x0,y1) (48)
app(filter,y1) filter1(y1) (49)
app(filter1(x0),y1) filter3(x0,y1) (50)
app(filter2,y1) filter21(y1) (51)
app(filter21(x0),y1) filter22(x0,y1) (52)
app(filter22(x0,x1),y1) filter23(x0,x1,y1) (53)
app(filter23(x0,x1,x2),y1) filter24(x0,x1,x2,y1) (54)

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) (75)
union2#(edge3(x,y,i),h) union2#(i,h) (76)
reach4#(x,y,edge3(u,v,i),h) if_reach_15#(eq2(x,u),x,y,edge3(u,v,i),h) (77)
reach4#(x,y,edge3(u,v,i),h) eq2#(x,u) (78)
if_reach_15#(true,x,y,edge3(u,v,i),h) if_reach_25#(eq2(y,v),x,y,edge3(u,v,i),h) (79)
if_reach_15#(true,x,y,edge3(u,v,i),h) eq2#(y,v) (80)
if_reach_15#(false,x,y,edge3(u,v,i),h) reach4#(x,y,i,edge3(u,v,h)) (81)
if_reach_25#(false,x,y,edge3(u,v,i),h) or2#(reach4(x,y,i,h),reach4(v,y,union2(i,h),empty)) (82)
if_reach_25#(false,x,y,edge3(u,v,i),h) reach4#(x,y,i,h) (83)
if_reach_25#(false,x,y,edge3(u,v,i),h) reach4#(v,y,union2(i,h),empty) (84)
if_reach_25#(false,x,y,edge3(u,v,i),h) union2#(i,h) (85)
map2#(f,cons2(x,xs)) app#(f,x) (86)
map2#(f,cons2(x,xs)) map2#(f,xs) (87)
filter3#(f,cons2(x,xs)) filter24#(app(f,x),f,x,xs) (88)
filter3#(f,cons2(x,xs)) app#(f,x) (89)
filter24#(true,f,x,xs) filter3#(f,xs) (90)
filter24#(false,f,x,xs) filter3#(f,xs) (91)
app#(eq1(x0),y1) eq2#(x0,y1) (92)
app#(or1(x0),y1) or2#(x0,y1) (93)
app#(union1(x0),y1) union2#(x0,y1) (94)
app#(reach3(x0,x1,x2),y1) reach4#(x0,x1,x2,y1) (95)
app#(if_reach_14(x0,x1,x2,x3),y1) if_reach_15#(x0,x1,x2,x3,y1) (96)
app#(if_reach_24(x0,x1,x2,x3),y1) if_reach_25#(x0,x1,x2,x3,y1) (97)
app#(map1(x0),y1) map2#(x0,y1) (98)
app#(filter1(x0),y1) filter3#(x0,y1) (99)
app#(filter23(x0,x1,x2),y1) filter24#(x0,x1,x2,y1) (100)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 4 components.