The rewrite relation of the following TRS is considered.
and(false,false) | → | false | (1) |
and(true,false) | → | false | (2) |
and(false,true) | → | false | (3) |
and(true,true) | → | true | (4) |
eq(nil,nil) | → | true | (5) |
eq(cons(T,L),nil) | → | false | (6) |
eq(nil,cons(T,L)) | → | false | (7) |
eq(cons(T,L),cons(Tp,Lp)) | → | and(eq(T,Tp),eq(L,Lp)) | (8) |
eq(var(L),var(Lp)) | → | eq(L,Lp) | (9) |
eq(var(L),apply(T,S)) | → | false | (10) |
eq(var(L),lambda(X,T)) | → | false | (11) |
eq(apply(T,S),var(L)) | → | false | (12) |
eq(apply(T,S),apply(Tp,Sp)) | → | and(eq(T,Tp),eq(S,Sp)) | (13) |
eq(apply(T,S),lambda(X,Tp)) | → | false | (14) |
eq(lambda(X,T),var(L)) | → | false | (15) |
eq(lambda(X,T),apply(Tp,Sp)) | → | false | (16) |
eq(lambda(X,T),lambda(Xp,Tp)) | → | and(eq(T,Tp),eq(X,Xp)) | (17) |
if(true,var(K),var(L)) | → | var(K) | (18) |
if(false,var(K),var(L)) | → | var(L) | (19) |
ren(var(L),var(K),var(Lp)) | → | if(eq(L,Lp),var(K),var(Lp)) | (20) |
ren(X,Y,apply(T,S)) | → | apply(ren(X,Y,T),ren(X,Y,S)) | (21) |
ren(X,Y,lambda(Z,T)) | → | lambda(var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),ren(X,Y,ren(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T))) | (22) |
eq#(cons(T,L),cons(Tp,Lp)) | → | eq#(L,Lp) | (23) |
eq#(cons(T,L),cons(Tp,Lp)) | → | eq#(T,Tp) | (24) |
eq#(cons(T,L),cons(Tp,Lp)) | → | and#(eq(T,Tp),eq(L,Lp)) | (25) |
eq#(var(L),var(Lp)) | → | eq#(L,Lp) | (26) |
eq#(apply(T,S),apply(Tp,Sp)) | → | eq#(S,Sp) | (27) |
eq#(apply(T,S),apply(Tp,Sp)) | → | eq#(T,Tp) | (28) |
eq#(apply(T,S),apply(Tp,Sp)) | → | and#(eq(T,Tp),eq(S,Sp)) | (29) |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | eq#(X,Xp) | (30) |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | eq#(T,Tp) | (31) |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | and#(eq(T,Tp),eq(X,Xp)) | (32) |
ren#(var(L),var(K),var(Lp)) | → | eq#(L,Lp) | (33) |
ren#(var(L),var(K),var(Lp)) | → | if#(eq(L,Lp),var(K),var(Lp)) | (34) |
ren#(X,Y,apply(T,S)) | → | ren#(X,Y,S) | (35) |
ren#(X,Y,apply(T,S)) | → | ren#(X,Y,T) | (36) |
ren#(X,Y,lambda(Z,T)) | → | ren#(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T) | (37) |
ren#(X,Y,lambda(Z,T)) | → | ren#(X,Y,ren(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T)) | (38) |
The dependency pairs are split into 2 components.
ren#(X,Y,lambda(Z,T)) | → | ren#(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T) | (37) |
ren#(X,Y,apply(T,S)) | → | ren#(X,Y,S) | (35) |
ren#(X,Y,apply(T,S)) | → | ren#(X,Y,T) | (36) |
ren#(X,Y,lambda(Z,T)) | → | ren#(X,Y,ren(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T)) | (38) |
prec(ren#) | = | 0 | stat(ren#) | = | lex | |
prec(ren) | = | 0 | stat(ren) | = | lex | |
prec(if) | = | 0 | stat(if) | = | lex | |
prec(lambda) | = | 0 | stat(lambda) | = | lex | |
prec(apply) | = | 0 | stat(apply) | = | lex | |
prec(var) | = | 0 | stat(var) | = | lex | |
prec(cons) | = | 0 | stat(cons) | = | lex | |
prec(eq) | = | 0 | stat(eq) | = | lex | |
prec(nil) | = | 0 | stat(nil) | = | lex | |
prec(true) | = | 0 | stat(true) | = | lex | |
prec(and) | = | 0 | stat(and) | = | lex | |
prec(false) | = | 0 | stat(false) | = | lex |
π(ren#) | = | 3 |
π(ren) | = | 3 |
π(if) | = | 3 |
π(lambda) | = | 2 |
π(apply) | = | [1,2] |
π(var) | = | [] |
π(cons) | = | [] |
π(eq) | = | [] |
π(nil) | = | [] |
π(true) | = | [] |
π(and) | = | [] |
π(false) | = | [] |
if(true,var(K),var(L)) | → | var(K) | (18) |
if(false,var(K),var(L)) | → | var(L) | (19) |
ren(var(L),var(K),var(Lp)) | → | if(eq(L,Lp),var(K),var(Lp)) | (20) |
ren(X,Y,apply(T,S)) | → | apply(ren(X,Y,T),ren(X,Y,S)) | (21) |
ren(X,Y,lambda(Z,T)) | → | lambda(var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),ren(X,Y,ren(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T))) | (22) |
ren#(X,Y,apply(T,S)) | → | ren#(X,Y,S) | (35) |
ren#(X,Y,apply(T,S)) | → | ren#(X,Y,T) | (36) |
prec(ren#) | = | 0 | stat(ren#) | = | lex | |
prec(ren) | = | 0 | stat(ren) | = | lex | |
prec(if) | = | 0 | stat(if) | = | lex | |
prec(lambda) | = | 0 | stat(lambda) | = | lex | |
prec(apply) | = | 0 | stat(apply) | = | lex | |
prec(var) | = | 0 | stat(var) | = | lex | |
prec(cons) | = | 0 | stat(cons) | = | lex | |
prec(eq) | = | 0 | stat(eq) | = | lex | |
prec(nil) | = | 0 | stat(nil) | = | lex | |
prec(true) | = | 0 | stat(true) | = | lex | |
prec(and) | = | 0 | stat(and) | = | lex | |
prec(false) | = | 0 | stat(false) | = | lex |
π(ren#) | = | 3 |
π(ren) | = | 3 |
π(if) | = | 2 |
π(lambda) | = | [2] |
π(apply) | = | 1 |
π(var) | = | [] |
π(cons) | = | [] |
π(eq) | = | [] |
π(nil) | = | [] |
π(true) | = | [] |
π(and) | = | [] |
π(false) | = | [] |
if(true,var(K),var(L)) | → | var(K) | (18) |
if(false,var(K),var(L)) | → | var(L) | (19) |
ren(var(L),var(K),var(Lp)) | → | if(eq(L,Lp),var(K),var(Lp)) | (20) |
ren(X,Y,apply(T,S)) | → | apply(ren(X,Y,T),ren(X,Y,S)) | (21) |
ren(X,Y,lambda(Z,T)) | → | lambda(var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),ren(X,Y,ren(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T))) | (22) |
ren#(X,Y,lambda(Z,T)) | → | ren#(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T) | (37) |
ren#(X,Y,lambda(Z,T)) | → | ren#(X,Y,ren(Z,var(cons(X,cons(Y,cons(lambda(Z,T),nil)))),T)) | (38) |
There are no pairs anymore.
eq#(cons(T,L),cons(Tp,Lp)) | → | eq#(L,Lp) | (23) |
eq#(cons(T,L),cons(Tp,Lp)) | → | eq#(T,Tp) | (24) |
eq#(var(L),var(Lp)) | → | eq#(L,Lp) | (26) |
eq#(apply(T,S),apply(Tp,Sp)) | → | eq#(S,Sp) | (27) |
eq#(apply(T,S),apply(Tp,Sp)) | → | eq#(T,Tp) | (28) |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | eq#(X,Xp) | (30) |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | eq#(T,Tp) | (31) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
eq#(cons(T,L),cons(Tp,Lp)) | → | eq#(L,Lp) | (23) |
2 | > | 2 | |
1 | > | 1 | |
eq#(cons(T,L),cons(Tp,Lp)) | → | eq#(T,Tp) | (24) |
2 | > | 2 | |
1 | > | 1 | |
eq#(var(L),var(Lp)) | → | eq#(L,Lp) | (26) |
2 | > | 2 | |
1 | > | 1 | |
eq#(apply(T,S),apply(Tp,Sp)) | → | eq#(S,Sp) | (27) |
2 | > | 2 | |
1 | > | 1 | |
eq#(apply(T,S),apply(Tp,Sp)) | → | eq#(T,Tp) | (28) |
2 | > | 2 | |
1 | > | 1 | |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | eq#(X,Xp) | (30) |
2 | > | 2 | |
1 | > | 1 | |
eq#(lambda(X,T),lambda(Xp,Tp)) | → | eq#(T,Tp) | (31) |
2 | > | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.