(0) Obligation:

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

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

Q is empty.

(1) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(2) Obligation:

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

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

(3) DependencyPairsProof (EQUIVALENT transformation)

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

(4) Obligation:

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

EQ(s(x), s(y)) → EQ(x, y)
SIZE(edge(x, y, i)) → SIZE(i)
LE(s(x), s(y)) → LE(x, y)
REACHABLE(x, y, i) → REACH(x, y, 0, i, i)
REACH(x, y, c, i, j) → IF1(eq(x, y), x, y, c, i, j)
REACH(x, y, c, i, j) → EQ(x, y)
IF1(false, x, y, c, i, j) → IF2(le(c, size(j)), x, y, c, i, j)
IF1(false, x, y, c, i, j) → LE(c, size(j))
IF1(false, x, y, c, i, j) → SIZE(j)
IF2(true, x, y, c, edge(u, v, i), j) → OR(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))
IF2(true, x, y, c, edge(u, v, i), j) → IF2(true, x, y, c, i, j)
IF2(true, x, y, c, edge(u, v, i), j) → AND(eq(x, u), reach(v, y, s(c), j, j))
IF2(true, x, y, c, edge(u, v, i), j) → EQ(x, u)
IF2(true, x, y, c, edge(u, v, i), j) → REACH(v, y, s(c), j, j)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

LE(s(x), s(y)) → LE(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


LE(s(x), s(y)) → LE(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
LE(x1, x2)  =  LE(x2)
s(x1)  =  s(x1)
eq(x1, x2)  =  eq(x2)
0  =  0
true  =  true
false  =  false
or(x1, x2)  =  x2
and(x1, x2)  =  x2
size(x1)  =  x1
empty  =  empty
edge(x1, x2, x3)  =  edge(x2, x3)
le(x1, x2)  =  le
reachable(x1, x2, x3)  =  reachable(x2)
reach(x1, x2, x3, x4, x5)  =  x2
if1(x1, x2, x3, x4, x5, x6)  =  x3
if2(x1, x2, x3, x4, x5, x6)  =  x3

Lexicographic path order with status [LPO].
Quasi-Precedence:
LE1 > [0, true, false, le]
[s1, edge2] > [0, true, false, le]
eq1 > [0, true, false, le]
empty > [0, true, false, le]
reachable1 > [0, true, false, le]

Status:
LE1: [1]
s1: [1]
eq1: [1]
0: []
true: []
false: []
empty: []
edge2: [2,1]
le: []
reachable1: [1]


The following usable rules [FROCOS05] were oriented:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

(9) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) Obligation:

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

SIZE(edge(x, y, i)) → SIZE(i)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


SIZE(edge(x, y, i)) → SIZE(i)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
SIZE(x1)  =  SIZE(x1)
edge(x1, x2, x3)  =  edge(x1, x2, x3)
eq(x1, x2)  =  eq
0  =  0
true  =  true
s(x1)  =  s(x1)
false  =  false
or(x1, x2)  =  x2
and(x1, x2)  =  x2
size(x1)  =  size(x1)
empty  =  empty
le(x1, x2)  =  le(x2)
reachable(x1, x2, x3)  =  x2
reach(x1, x2, x3, x4, x5)  =  x2
if1(x1, x2, x3, x4, x5, x6)  =  x3
if2(x1, x2, x3, x4, x5, x6)  =  x3

Lexicographic path order with status [LPO].
Quasi-Precedence:
SIZE1 > [eq, 0, true, s1, false, size1, le1]
edge3 > [eq, 0, true, s1, false, size1, le1]
empty > [eq, 0, true, s1, false, size1, le1]

Status:
SIZE1: [1]
edge3: [1,2,3]
eq: []
0: []
true: []
s1: [1]
false: []
size1: [1]
empty: []
le1: [1]


The following usable rules [FROCOS05] were oriented:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

(14) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(15) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(16) TRUE

(17) Obligation:

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

EQ(s(x), s(y)) → EQ(x, y)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(18) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


EQ(s(x), s(y)) → EQ(x, y)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
EQ(x1, x2)  =  EQ(x2)
s(x1)  =  s(x1)
eq(x1, x2)  =  eq(x2)
0  =  0
true  =  true
false  =  false
or(x1, x2)  =  x2
and(x1, x2)  =  x2
size(x1)  =  x1
empty  =  empty
edge(x1, x2, x3)  =  edge(x2, x3)
le(x1, x2)  =  le
reachable(x1, x2, x3)  =  reachable(x2)
reach(x1, x2, x3, x4, x5)  =  x2
if1(x1, x2, x3, x4, x5, x6)  =  x3
if2(x1, x2, x3, x4, x5, x6)  =  x3

Lexicographic path order with status [LPO].
Quasi-Precedence:
EQ1 > [0, true, false, le]
[s1, edge2] > [0, true, false, le]
eq1 > [0, true, false, le]
empty > [0, true, false, le]
reachable1 > [0, true, false, le]

Status:
EQ1: [1]
s1: [1]
eq1: [1]
0: []
true: []
false: []
empty: []
edge2: [2,1]
le: []
reachable1: [1]


The following usable rules [FROCOS05] were oriented:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

(19) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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

(20) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(21) TRUE

(22) Obligation:

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

REACH(x, y, c, i, j) → IF1(eq(x, y), x, y, c, i, j)
IF1(false, x, y, c, i, j) → IF2(le(c, size(j)), x, y, c, i, j)
IF2(true, x, y, c, edge(u, v, i), j) → IF2(true, x, y, c, i, j)
IF2(true, x, y, c, edge(u, v, i), j) → REACH(v, y, s(c), j, j)

The TRS R consists of the following rules:

eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
or(true, y) → true
or(false, y) → y
and(true, y) → y
and(false, y) → false
size(empty) → 0
size(edge(x, y, i)) → s(size(i))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
reachable(x, y, i) → reach(x, y, 0, i, i)
reach(x, y, c, i, j) → if1(eq(x, y), x, y, c, i, j)
if1(true, x, y, c, i, j) → true
if1(false, x, y, c, i, j) → if2(le(c, size(j)), x, y, c, i, j)
if2(false, x, y, c, i, j) → false
if2(true, x, y, c, empty, j) → false
if2(true, x, y, c, edge(u, v, i), j) → or(if2(true, x, y, c, i, j), and(eq(x, u), reach(v, y, s(c), j, j)))

The set Q consists of the following terms:

eq(0, 0)
eq(0, s(x0))
eq(s(x0), 0)
eq(s(x0), s(x1))
or(true, x0)
or(false, x0)
and(true, x0)
and(false, x0)
size(empty)
size(edge(x0, x1, x2))
le(0, x0)
le(s(x0), 0)
le(s(x0), s(x1))
reachable(x0, x1, x2)
reach(x0, x1, x2, x3, x4)
if1(true, x0, x1, x2, x3, x4)
if1(false, x0, x1, x2, x3, x4)
if2(false, x0, x1, x2, x3, x4)
if2(true, x0, x1, x2, empty, x3)
if2(true, x0, x1, x2, edge(x3, x4, x5), x6)

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