The rewrite relation of the following TRS is considered.
app(app(and,true),true) | → | true | (1) |
app(app(and,x),false) | → | false | (2) |
app(app(and,false),y) | → | false | (3) |
app(app(or,true),y) | → | true | (4) |
app(app(or,x),true) | → | true | (5) |
app(app(or,false),false) | → | false | (6) |
app(app(forall,p),nil) | → | true | (7) |
app(app(forall,p),app(app(cons,x),xs)) | → | app(app(and,app(p,x)),app(app(forall,p),xs)) | (8) |
app(app(forsome,p),nil) | → | false | (9) |
app(app(forsome,p),app(app(cons,x),xs)) | → | app(app(or,app(p,x)),app(app(forsome,p),xs)) | (10) |
We uncurry the binary symbol app in combination with the following symbol map which also determines the applicative arities of these symbols.
and | is mapped to | and, | and1(x1), | and2(x1, x2) |
true | is mapped to | true | ||
false | is mapped to | false | ||
or | is mapped to | or, | or1(x1), | or2(x1, x2) |
forall | is mapped to | forall, | forall1(x1), | forall2(x1, x2) |
nil | is mapped to | nil | ||
cons | is mapped to | cons, | cons1(x1), | cons2(x1, x2) |
forsome | is mapped to | forsome, | forsome1(x1), | forsome2(x1, x2) |
and2(true,true) | → | true | (21) |
and2(x,false) | → | false | (22) |
and2(false,y) | → | false | (23) |
or2(true,y) | → | true | (24) |
or2(x,true) | → | true | (25) |
or2(false,false) | → | false | (26) |
forall2(p,nil) | → | true | (27) |
forall2(p,cons2(x,xs)) | → | and2(app(p,x),forall2(p,xs)) | (28) |
forsome2(p,nil) | → | false | (29) |
forsome2(p,cons2(x,xs)) | → | or2(app(p,x),forsome2(p,xs)) | (30) |
app(and,y1) | → | and1(y1) | (11) |
app(and1(x0),y1) | → | and2(x0,y1) | (12) |
app(or,y1) | → | or1(y1) | (13) |
app(or1(x0),y1) | → | or2(x0,y1) | (14) |
app(forall,y1) | → | forall1(y1) | (15) |
app(forall1(x0),y1) | → | forall2(x0,y1) | (16) |
app(cons,y1) | → | cons1(y1) | (17) |
app(cons1(x0),y1) | → | cons2(x0,y1) | (18) |
app(forsome,y1) | → | forsome1(y1) | (19) |
app(forsome1(x0),y1) | → | forsome2(x0,y1) | (20) |
prec(and2) | = | 0 | stat(and2) | = | mul | |
prec(true) | = | 1 | stat(true) | = | mul | |
prec(false) | = | 0 | stat(false) | = | mul | |
prec(or2) | = | 1 | stat(or2) | = | mul | |
prec(forall2) | = | 4 | stat(forall2) | = | mul | |
prec(nil) | = | 1 | stat(nil) | = | mul | |
prec(cons2) | = | 2 | stat(cons2) | = | lex | |
prec(app) | = | 4 | stat(app) | = | mul | |
prec(forsome2) | = | 4 | stat(forsome2) | = | mul | |
prec(and) | = | 5 | stat(and) | = | mul | |
prec(and1) | = | 4 | stat(and1) | = | mul | |
prec(or) | = | 6 | stat(or) | = | mul | |
prec(or1) | = | 4 | stat(or1) | = | mul | |
prec(forall) | = | 7 | stat(forall) | = | mul | |
prec(forall1) | = | 4 | stat(forall1) | = | mul | |
prec(cons) | = | 8 | stat(cons) | = | mul | |
prec(cons1) | = | 4 | stat(cons1) | = | mul | |
prec(forsome) | = | 9 | stat(forsome) | = | mul | |
prec(forsome1) | = | 3 | stat(forsome1) | = | lex |
π(and2) | = | [1,2] |
π(true) | = | [] |
π(false) | = | [] |
π(or2) | = | [1,2] |
π(forall2) | = | [1,2] |
π(nil) | = | [] |
π(cons2) | = | [2,1] |
π(app) | = | [1,2] |
π(forsome2) | = | [1,2] |
π(and) | = | [] |
π(and1) | = | [1] |
π(or) | = | [] |
π(or1) | = | [1] |
π(forall) | = | [] |
π(forall1) | = | [1] |
π(cons) | = | [] |
π(cons1) | = | [1] |
π(forsome) | = | [] |
π(forsome1) | = | [1] |
and2(true,true) | → | true | (21) |
and2(x,false) | → | false | (22) |
and2(false,y) | → | false | (23) |
or2(true,y) | → | true | (24) |
or2(x,true) | → | true | (25) |
or2(false,false) | → | false | (26) |
forall2(p,nil) | → | true | (27) |
forall2(p,cons2(x,xs)) | → | and2(app(p,x),forall2(p,xs)) | (28) |
forsome2(p,nil) | → | false | (29) |
forsome2(p,cons2(x,xs)) | → | or2(app(p,x),forsome2(p,xs)) | (30) |
app(and,y1) | → | and1(y1) | (11) |
app(and1(x0),y1) | → | and2(x0,y1) | (12) |
app(or,y1) | → | or1(y1) | (13) |
app(or1(x0),y1) | → | or2(x0,y1) | (14) |
app(forall,y1) | → | forall1(y1) | (15) |
app(forall1(x0),y1) | → | forall2(x0,y1) | (16) |
app(cons,y1) | → | cons1(y1) | (17) |
app(cons1(x0),y1) | → | cons2(x0,y1) | (18) |
app(forsome,y1) | → | forsome1(y1) | (19) |
app(forsome1(x0),y1) | → | forsome2(x0,y1) | (20) |
There are no rules in the TRS. Hence, it is terminating.