Certification Problem

Input (TPDB TRS_Standard/AProVE_07/thiemann38)

The rewrite relation of the following TRS is considered.

length(nil) 0 (1)
length(cons(x,l)) s(length(l)) (2)
lt(x,0) false (3)
lt(0,s(y)) true (4)
lt(s(x),s(y)) lt(x,y) (5)
head(cons(x,l)) x (6)
head(nil) undefined (7)
tail(nil) nil (8)
tail(cons(x,l)) l (9)
reverse(l) rev(0,l,nil,l) (10)
rev(x,l,accu,orig) if(lt(x,length(orig)),x,l,accu,orig) (11)
if(true,x,l,accu,orig) rev(s(x),tail(l),cons(head(l),accu),orig) (12)
if(false,x,l,accu,orig) accu (13)

Property / Task

Prove or disprove termination.

Answer / Result

Yes.

Proof (by AProVE @ termCOMP 2023)

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

The following set of initial dependency pairs has been identified.
length#(cons(x,l)) length#(l) (14)
lt#(s(x),s(y)) lt#(x,y) (15)
reverse#(l) rev#(0,l,nil,l) (16)
rev#(x,l,accu,orig) if#(lt(x,length(orig)),x,l,accu,orig) (17)
rev#(x,l,accu,orig) lt#(x,length(orig)) (18)
rev#(x,l,accu,orig) length#(orig) (19)
if#(true,x,l,accu,orig) rev#(s(x),tail(l),cons(head(l),accu),orig) (20)
if#(true,x,l,accu,orig) tail#(l) (21)
if#(true,x,l,accu,orig) head#(l) (22)

1.1.1 Dependency Graph Processor

The dependency pairs are split into 3 components.