(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

+1(0(x), 0(y)) → 01(+(x, y))
+1(0(x), 0(y)) → +1(x, y)
+1(0(x), 1(y)) → +1(x, y)
+1(1(x), 0(y)) → +1(x, y)
+1(1(x), 1(y)) → 01(+(+(x, y), 1(#)))
+1(1(x), 1(y)) → +1(+(x, y), 1(#))
+1(1(x), 1(y)) → +1(x, y)
+1(x, +(y, z)) → +1(+(x, y), z)
+1(x, +(y, z)) → +1(x, y)
-1(0(x), 0(y)) → 01(-(x, y))
-1(0(x), 0(y)) → -1(x, y)
-1(0(x), 1(y)) → -1(-(x, y), 1(#))
-1(0(x), 1(y)) → -1(x, y)
-1(1(x), 0(y)) → -1(x, y)
-1(1(x), 1(y)) → 01(-(x, y))
-1(1(x), 1(y)) → -1(x, y)
GE(0(x), 0(y)) → GE(x, y)
GE(0(x), 1(y)) → NOT(ge(y, x))
GE(0(x), 1(y)) → GE(y, x)
GE(1(x), 0(y)) → GE(x, y)
GE(1(x), 1(y)) → GE(x, y)
GE(#, 0(x)) → GE(#, x)
MIN(n(x, y, z)) → MIN(y)
MAX(n(x, y, z)) → MAX(z)
BS(n(x, y, z)) → AND(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
BS(n(x, y, z)) → AND(ge(x, max(y)), ge(min(z), x))
BS(n(x, y, z)) → GE(x, max(y))
BS(n(x, y, z)) → MAX(y)
BS(n(x, y, z)) → GE(min(z), x)
BS(n(x, y, z)) → MIN(z)
BS(n(x, y, z)) → AND(bs(y), bs(z))
BS(n(x, y, z)) → BS(y)
BS(n(x, y, z)) → BS(z)
SIZE(n(x, y, z)) → +1(+(size(x), size(y)), 1(#))
SIZE(n(x, y, z)) → +1(size(x), size(y))
SIZE(n(x, y, z)) → SIZE(x)
SIZE(n(x, y, z)) → SIZE(y)
WB(n(x, y, z)) → AND(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))
WB(n(x, y, z)) → IF(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y))))
WB(n(x, y, z)) → GE(size(y), size(z))
WB(n(x, y, z)) → SIZE(y)
WB(n(x, y, z)) → SIZE(z)
WB(n(x, y, z)) → GE(1(#), -(size(y), size(z)))
WB(n(x, y, z)) → -1(size(y), size(z))
WB(n(x, y, z)) → GE(1(#), -(size(z), size(y)))
WB(n(x, y, z)) → -1(size(z), size(y))
WB(n(x, y, z)) → AND(wb(y), wb(z))
WB(n(x, y, z)) → WB(y)
WB(n(x, y, z)) → WB(z)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 9 SCCs with 24 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MAX(n(x, y, z)) → MAX(z)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MIN(n(x, y, z)) → MIN(y)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GE(#, 0(x)) → GE(#, x)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

GE(0(x), 1(y)) → GE(y, x)
GE(0(x), 0(y)) → GE(x, y)
GE(1(x), 0(y)) → GE(x, y)
GE(1(x), 1(y)) → GE(x, y)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

BS(n(x, y, z)) → BS(z)
BS(n(x, y, z)) → BS(y)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(10) Obligation:

Q DP problem:
The TRS P consists of the following rules:

-1(0(x), 1(y)) → -1(-(x, y), 1(#))
-1(0(x), 1(y)) → -1(x, y)
-1(0(x), 0(y)) → -1(x, y)
-1(1(x), 0(y)) → -1(x, y)
-1(1(x), 1(y)) → -1(x, y)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

+1(0(x), 1(y)) → +1(x, y)
+1(0(x), 0(y)) → +1(x, y)
+1(1(x), 0(y)) → +1(x, y)
+1(1(x), 1(y)) → +1(+(x, y), 1(#))
+1(1(x), 1(y)) → +1(x, y)
+1(x, +(y, z)) → +1(+(x, y), z)
+1(x, +(y, z)) → +1(x, y)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) Obligation:

Q DP problem:
The TRS P consists of the following rules:

SIZE(n(x, y, z)) → SIZE(y)
SIZE(n(x, y, z)) → SIZE(x)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

WB(n(x, y, z)) → WB(z)
WB(n(x, y, z)) → WB(y)

The TRS R consists of the following rules:

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(x, +(y, z)) → +(+(x, y), z)
-(x, #) → x
-(#, x) → #
-(0(x), 0(y)) → 0(-(x, y))
-(0(x), 1(y)) → 1(-(-(x, y), 1(#)))
-(1(x), 0(y)) → 1(-(x, y))
-(1(x), 1(y)) → 0(-(x, y))
not(false) → true
not(true) → false
and(x, true) → x
and(x, false) → false
if(true, x, y) → x
if(false, x, y) → y
ge(0(x), 0(y)) → ge(x, y)
ge(0(x), 1(y)) → not(ge(y, x))
ge(1(x), 0(y)) → ge(x, y)
ge(1(x), 1(y)) → ge(x, y)
ge(x, #) → true
ge(#, 1(x)) → false
ge(#, 0(x)) → ge(#, x)
val(l(x)) → x
val(n(x, y, z)) → x
min(l(x)) → x
min(n(x, y, z)) → min(y)
max(l(x)) → x
max(n(x, y, z)) → max(z)
bs(l(x)) → true
bs(n(x, y, z)) → and(and(ge(x, max(y)), ge(min(z), x)), and(bs(y), bs(z)))
size(l(x)) → 1(#)
size(n(x, y, z)) → +(+(size(x), size(y)), 1(#))
wb(l(x)) → true
wb(n(x, y, z)) → and(if(ge(size(y), size(z)), ge(1(#), -(size(y), size(z))), ge(1(#), -(size(z), size(y)))), and(wb(y), wb(z)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.