Certification Problem

Input (TPDB TRS_Standard/AProVE_07/thiemann39)

The rewrite relation of the following TRS is considered.

a(a(divides,0),a(s,y)) true (1)
a(a(divides,a(s,x)),a(s,y)) a(a(a(div2,x),a(s,y)),y) (2)
a(a(a(div2,x),y),0) a(a(divides,x),y) (3)
a(a(a(div2,0),y),a(s,z)) false (4)
a(a(a(div2,a(s,x)),y),a(s,z)) a(a(a(div2,x),y),z) (5)
a(a(filter,f),nil) nil (6)
a(a(filter,f),a(a(cons,x),xs)) a(a(a(if,a(f,x)),x),a(a(filter,f),xs)) (7)
a(a(a(if,true),x),xs) a(a(cons,x),xs) (8)
a(a(a(if,false),x),xs) xs (9)
a(a(not,f),x) a(not2,a(f,x)) (10)
a(not2,true) false (11)
a(not2,false) true (12)
a(sieve,nil) nil (13)
a(sieve,a(a(cons,x),xs)) a(a(cons,x),a(sieve,a(a(filter,a(not,a(divides,x))),xs))) (14)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

1 Uncurrying

We uncurry the binary symbol a in combination with the following symbol map which also determines the applicative arities of these symbols.

divides is mapped to divides, divides1(x1), divides2(x1, x2)
0 is mapped to 0
s is mapped to s, s1(x1)
true is mapped to true
div2 is mapped to div2, div21(x1), div22(x1, x2), div23(x1, x2, x3)
false is mapped to false
filter is mapped to filter, filter1(x1), filter2(x1, x2)
nil is mapped to nil
cons is mapped to cons, cons1(x1), cons2(x1, x2)
if is mapped to if, if1(x1), if2(x1, x2), if3(x1, x2, x3)
not is mapped to not, not1(x1), not3(x1, x2)
not2 is mapped to not2, not21(x1)
sieve is mapped to sieve, sieve1(x1)


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
divides2(0,s1(y)) true (32)
divides2(s1(x),s1(y)) div23(x,s1(y),y) (33)
div23(x,y,0) divides2(x,y) (34)
div23(0,y,s1(z)) false (35)
div23(s1(x),y,s1(z)) div23(x,y,z) (36)
filter2(f,nil) nil (37)
filter2(f,cons2(x,xs)) if3(a(f,x),x,filter2(f,xs)) (38)
if3(true,x,xs) cons2(x,xs) (39)
if3(false,x,xs) xs (40)
not3(f,x) not21(a(f,x)) (41)
not21(true) false (42)
not21(false) true (43)
sieve1(nil) nil (44)
sieve1(cons2(x,xs)) cons2(x,sieve1(filter2(not1(divides1(x)),xs))) (45)
a(divides,y1) divides1(y1) (15)
a(divides1(x0),y1) divides2(x0,y1) (16)
a(s,y1) s1(y1) (17)
a(div2,y1) div21(y1) (18)
a(div21(x0),y1) div22(x0,y1) (19)
a(div22(x0,x1),y1) div23(x0,x1,y1) (20)
a(filter,y1) filter1(y1) (21)
a(filter1(x0),y1) filter2(x0,y1) (22)
a(cons,y1) cons1(y1) (23)
a(cons1(x0),y1) cons2(x0,y1) (24)
a(if,y1) if1(y1) (25)
a(if1(x0),y1) if2(x0,y1) (26)
a(if2(x0,x1),y1) if3(x0,x1,y1) (27)
a(not,y1) not1(y1) (28)
a(not1(x0),y1) not3(x0,y1) (29)
a(not2,y1) not21(y1) (30)
a(sieve,y1) sieve1(y1) (31)

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.
divides2#(s1(x),s1(y)) div23#(x,s1(y),y) (46)
div23#(x,y,0) divides2#(x,y) (47)
div23#(s1(x),y,s1(z)) div23#(x,y,z) (48)
filter2#(f,cons2(x,xs)) if3#(a(f,x),x,filter2(f,xs)) (49)
filter2#(f,cons2(x,xs)) a#(f,x) (50)
filter2#(f,cons2(x,xs)) filter2#(f,xs) (51)
not3#(f,x) not21#(a(f,x)) (52)
not3#(f,x) a#(f,x) (53)
sieve1#(cons2(x,xs)) sieve1#(filter2(not1(divides1(x)),xs)) (54)
sieve1#(cons2(x,xs)) filter2#(not1(divides1(x)),xs) (55)
a#(divides1(x0),y1) divides2#(x0,y1) (56)
a#(div22(x0,x1),y1) div23#(x0,x1,y1) (57)
a#(filter1(x0),y1) filter2#(x0,y1) (58)
a#(if2(x0,x1),y1) if3#(x0,x1,y1) (59)
a#(not1(x0),y1) not3#(x0,y1) (60)
a#(not2,y1) not21#(y1) (61)
a#(sieve,y1) sieve1#(y1) (62)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 2 components.