Certification Problem

Input (TPDB TRS_Standard/Applicative_05/BTreeMember)

The rewrite relation of the following TRS is considered.

app(app(lt,app(s,x)),app(s,y)) app(app(lt,x),y) (1)
app(app(lt,0),app(s,y)) true (2)
app(app(lt,y),0) false (3)
app(app(eq,x),x) true (4)
app(app(eq,app(s,x)),0) false (5)
app(app(eq,0),app(s,x)) false (6)
app(app(member,w),null) false (7)
app(app(member,w),app(app(app(fork,x),y),z)) app(app(app(if,app(app(lt,w),y)),app(app(member,w),x)),app(app(app(if,app(app(eq,w),y)),true),app(app(member,w),z))) (8)

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.

lt is mapped to lt, lt1(x1), lt2(x1, x2)
s is mapped to s, s1(x1)
0 is mapped to 0
true is mapped to true
false is mapped to false
eq is mapped to eq, eq1(x1), eq2(x1, x2)
member is mapped to member, member1(x1), member2(x1, x2)
null is mapped to null
fork is mapped to fork, fork1(x1), fork2(x1, x2), fork3(x1, x2, x3)
if is mapped to if, if1(x1), if2(x1, x2), if3(x1, x2, x3)


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
lt2(s1(x),s1(y)) lt2(x,y) (22)
lt2(0,s1(y)) true (23)
lt2(y,0) false (24)
eq2(x,x) true (25)
eq2(s1(x),0) false (26)
eq2(0,s1(x)) false (27)
member2(w,null) false (28)
member2(w,fork3(x,y,z)) if3(lt2(w,y),member2(w,x),if3(eq2(w,y),true,member2(w,z))) (29)
app(lt,y1) lt1(y1) (9)
app(lt1(x0),y1) lt2(x0,y1) (10)
app(s,y1) s1(y1) (11)
app(eq,y1) eq1(y1) (12)
app(eq1(x0),y1) eq2(x0,y1) (13)
app(member,y1) member1(y1) (14)
app(member1(x0),y1) member2(x0,y1) (15)
app(fork,y1) fork1(y1) (16)
app(fork1(x0),y1) fork2(x0,y1) (17)
app(fork2(x0,x1),y1) fork3(x0,x1,y1) (18)
app(if,y1) if1(y1) (19)
app(if1(x0),y1) if2(x0,y1) (20)
app(if2(x0,x1),y1) if3(x0,x1,y1) (21)

1.1 Rule Removal

Using the
prec(lt2) = 1 stat(lt2) = lex
prec(s1) = 2 stat(s1) = mul
prec(0) = 3 stat(0) = mul
prec(true) = 1 stat(true) = mul
prec(false) = 2 stat(false) = mul
prec(eq2) = 4 stat(eq2) = mul
prec(member2) = 4 stat(member2) = mul
prec(null) = 5 stat(null) = mul
prec(fork3) = 1 stat(fork3) = mul
prec(if3) = 0 stat(if3) = lex
prec(app) = 10 stat(app) = mul
prec(lt) = 11 stat(lt) = mul
prec(s) = 12 stat(s) = mul
prec(eq) = 13 stat(eq) = mul
prec(eq1) = 6 stat(eq1) = mul
prec(member) = 14 stat(member) = mul
prec(fork) = 15 stat(fork) = mul
prec(fork1) = 8 stat(fork1) = lex
prec(fork2) = 7 stat(fork2) = lex
prec(if) = 16 stat(if) = mul
prec(if1) = 10 stat(if1) = mul
prec(if2) = 9 stat(if2) = lex

π(lt2) = [2,1]
π(s1) = [1]
π(0) = []
π(true) = []
π(false) = []
π(eq2) = [1,2]
π(member2) = [1,2]
π(null) = []
π(fork3) = [1,2,3]
π(if3) = [1,2,3]
π(app) = [1,2]
π(lt) = []
π(lt1) = 1
π(s) = []
π(eq) = []
π(eq1) = [1]
π(member) = []
π(member1) = 1
π(fork) = []
π(fork1) = [1]
π(fork2) = [1,2]
π(if) = []
π(if1) = [1]
π(if2) = [2,1]

all of the following rules can be deleted.
lt2(s1(x),s1(y)) lt2(x,y) (22)
lt2(0,s1(y)) true (23)
lt2(y,0) false (24)
eq2(x,x) true (25)
eq2(s1(x),0) false (26)
eq2(0,s1(x)) false (27)
member2(w,null) false (28)
member2(w,fork3(x,y,z)) if3(lt2(w,y),member2(w,x),if3(eq2(w,y),true,member2(w,z))) (29)
app(lt,y1) lt1(y1) (9)
app(lt1(x0),y1) lt2(x0,y1) (10)
app(s,y1) s1(y1) (11)
app(eq,y1) eq1(y1) (12)
app(eq1(x0),y1) eq2(x0,y1) (13)
app(member,y1) member1(y1) (14)
app(member1(x0),y1) member2(x0,y1) (15)
app(fork,y1) fork1(y1) (16)
app(fork1(x0),y1) fork2(x0,y1) (17)
app(fork2(x0,x1),y1) fork3(x0,x1,y1) (18)
app(if,y1) if1(y1) (19)
app(if1(x0),y1) if2(x0,y1) (20)
app(if2(x0,x1),y1) if3(x0,x1,y1) (21)

1.1.1 R is empty

There are no rules in the TRS. Hence, it is terminating.