Certification Problem

Input (TPDB TRS_Standard/AotoYamada_05/002)

The rewrite relation of the following TRS is considered.

app(app(filter,f),nil) nil (1)
app(app(filter,f),app(app(cons,y),ys)) app(app(app(filtersub,app(f,y)),f),app(app(cons,y),ys)) (2)
app(app(app(filtersub,true),f),app(app(cons,y),ys)) app(app(cons,y),app(app(filter,f),ys)) (3)
app(app(app(filtersub,false),f),app(app(cons,y),ys)) app(app(filter,f),ys) (4)

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.

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)
filtersub is mapped to filtersub, filtersub1(x1), filtersub2(x1, x2), filtersub3(x1, x2, x3)
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
filter2(f,nil) nil (12)
filter2(f,cons2(y,ys)) filtersub3(app(f,y),f,cons2(y,ys)) (13)
filtersub3(true,f,cons2(y,ys)) cons2(y,filter2(f,ys)) (14)
filtersub3(false,f,cons2(y,ys)) filter2(f,ys) (15)
app(filter,y1) filter1(y1) (5)
app(filter1(x0),y1) filter2(x0,y1) (6)
app(cons,y1) cons1(y1) (7)
app(cons1(x0),y1) cons2(x0,y1) (8)
app(filtersub,y1) filtersub1(y1) (9)
app(filtersub1(x0),y1) filtersub2(x0,y1) (10)
app(filtersub2(x0,x1),y1) filtersub3(x0,x1,y1) (11)

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.
filter2#(f,cons2(y,ys)) filtersub3#(app(f,y),f,cons2(y,ys)) (16)
filter2#(f,cons2(y,ys)) app#(f,y) (17)
filtersub3#(true,f,cons2(y,ys)) filter2#(f,ys) (18)
filtersub3#(false,f,cons2(y,ys)) filter2#(f,ys) (19)
app#(filter1(x0),y1) filter2#(x0,y1) (20)
app#(filtersub2(x0,x1),y1) filtersub3#(x0,x1,y1) (21)

1.1.1.1 Dependency Graph Processor

The dependency pairs are split into 1 component.