The relative rewrite relation R/S is considered where R is the following TRS
not(true) | → | false | (1) |
not(false) | → | true | (2) |
evenodd(x,0) | → | not(evenodd(x,s(0))) | (3) |
evenodd(0,s(0)) | → | false | (4) |
evenodd(s(x),s(0)) | → | evenodd(x,0) | (5) |
and S is the following TRS.
rand(x) | → | x | (6) |
rand(x) | → | rand(s(x)) | (7) |
[evenodd(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[0] | = |
|
||||||||||||||||||||||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[true] | = |
|
||||||||||||||||||||||||||||||||||||
[rand(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[false] | = |
|
evenodd(0,s(0)) | → | false | (4) |
[evenodd(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[0] | = |
|
||||||||||||||||||||||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[true] | = |
|
||||||||||||||||||||||||||||||||||||
[rand(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[false] | = |
|
not(false) | → | true | (2) |
[evenodd(x1, x2)] | = |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[not(x1)] | = |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[0] | = |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[s(x1)] | = |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[true] | = |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[rand(x1)] | = |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[false] | = |
|
not(true) | → | false | (1) |
[evenodd(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[0] | = |
|
||||||||||||||||||||||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[rand(x1)] | = |
|
rand(x) | → | x | (6) |
[evenodd(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[0] | = |
|
||||||||||||||||||||||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[rand(x1)] | = |
|
evenodd(s(x),s(0)) | → | evenodd(x,0) | (5) |
[evenodd(x1, x2)] | = |
|
||||||||||||||||||||||||||||||||||||
[not(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[0] | = |
|
||||||||||||||||||||||||||||||||||||
[s(x1)] | = |
|
||||||||||||||||||||||||||||||||||||
[rand(x1)] | = |
|
evenodd(x,0) | → | not(evenodd(x,s(0))) | (3) |
There are no rules in the TRS. Hence, it is terminating.