The rewrite relation of the following TRS is considered.
add(true,x,xs) | → | add(and(isNat(x),isList(xs)),x,Cons(x,xs)) | (1) |
isList(Cons(x,xs)) | → | isList(xs) | (2) |
isList(nil) | → | true | (3) |
isNat(s(x)) | → | isNat(x) | (4) |
isNat(0) | → | true | (5) |
if(true,x,y) | → | x | (6) |
if(false,x,y) | → | y | (7) |
and(true,true) | → | true | (8) |
and(false,x) | → | false | (9) |
and(x,false) | → | false | (10) |
add(true,x0,x1) |
isList(Cons(x0,x1)) |
isList(nil) |
isNat(s(x0)) |
isNat(0) |
if(true,x0,x1) |
if(false,x0,x1) |
and(true,true) |
and(false,x0) |
and(x0,false) |
add#(true,x,xs) | → | add#(and(isNat(x),isList(xs)),x,Cons(x,xs)) | (11) |
add#(true,x,xs) | → | and#(isNat(x),isList(xs)) | (12) |
add#(true,x,xs) | → | isNat#(x) | (13) |
add#(true,x,xs) | → | isList#(xs) | (14) |
isList#(Cons(x,xs)) | → | isList#(xs) | (15) |
isNat#(s(x)) | → | isNat#(x) | (16) |
add#(true,x,xs) | → | and#(isNat(x),isList(xs)) | (12) |
add#(true,x,xs) | → | isNat#(x) | (13) |
add#(true,x,xs) | → | isList#(xs) | (14) |
isList#(Cons(x,xs)) | → | isList#(xs) | (15) |
isNat#(s(x)) | → | isNat#(x) | (16) |
An infinite (possibly non-looping) derivation has been detected due to the following pattern rule.
add#(true,0,Cons(0,zr1)) {zr1/nil} n {zr1/Cons(0,zr1)} →+add#(true,0,Cons(0,Cons(0,zr1))) {zr1/nil} n {zr1/Cons(0,zr1)}