(0) Obligation:

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

a(a(divides, 0), a(s, y)) → true
a(a(divides, a(s, x)), a(s, y)) → a(a(a(div2, x), a(s, y)), y)
a(a(a(div2, x), y), 0) → a(a(divides, x), y)
a(a(a(div2, 0), y), a(s, z)) → false
a(a(a(div2, a(s, x)), y), a(s, z)) → a(a(a(div2, x), y), z)
a(a(filter, f), nil) → nil
a(a(filter, f), a(a(cons, x), xs)) → a(a(a(if, a(f, x)), x), a(a(filter, f), xs))
a(a(a(if, true), x), xs) → a(a(cons, x), xs)
a(a(a(if, false), x), xs) → xs
a(a(not, f), x) → a(not2, a(f, x))
a(not2, true) → false
a(not2, false) → true
a(sieve, nil) → nil
a(sieve, a(a(cons, x), xs)) → a(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))

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:

a(a(divides, 0), a(s, y)) → true
a(a(divides, a(s, x)), a(s, y)) → a(a(a(div2, x), a(s, y)), y)
a(a(a(div2, x), y), 0) → a(a(divides, x), y)
a(a(a(div2, 0), y), a(s, z)) → false
a(a(a(div2, a(s, x)), y), a(s, z)) → a(a(a(div2, x), y), z)
a(a(filter, f), nil) → nil
a(a(filter, f), a(a(cons, x), xs)) → a(a(a(if, a(f, x)), x), a(a(filter, f), xs))
a(a(a(if, true), x), xs) → a(a(cons, x), xs)
a(a(a(if, false), x), xs) → xs
a(a(not, f), x) → a(not2, a(f, x))
a(not2, true) → false
a(not2, false) → true
a(sieve, nil) → nil
a(sieve, a(a(cons, x), xs)) → a(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))

The set Q consists of the following terms:

a(a(divides, 0), a(s, x0))
a(a(divides, a(s, x0)), a(s, x1))
a(a(a(div2, x0), x1), 0)
a(a(a(div2, 0), x0), a(s, x1))
a(a(a(div2, a(s, x0)), x1), a(s, x2))
a(a(filter, x0), nil)
a(a(filter, x0), a(a(cons, x1), x2))
a(a(a(if, true), x0), x1)
a(a(a(if, false), x0), x1)
a(a(not, x0), x1)
a(not2, true)
a(not2, false)
a(sieve, nil)
a(sieve, a(a(cons, x0), x1))

(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:

A(a(divides, a(s, x)), a(s, y)) → A(a(a(div2, x), a(s, y)), y)
A(a(divides, a(s, x)), a(s, y)) → A(a(div2, x), a(s, y))
A(a(divides, a(s, x)), a(s, y)) → A(div2, x)
A(a(a(div2, x), y), 0) → A(a(divides, x), y)
A(a(a(div2, x), y), 0) → A(divides, x)
A(a(a(div2, a(s, x)), y), a(s, z)) → A(a(a(div2, x), y), z)
A(a(a(div2, a(s, x)), y), a(s, z)) → A(a(div2, x), y)
A(a(a(div2, a(s, x)), y), a(s, z)) → A(div2, x)
A(a(filter, f), a(a(cons, x), xs)) → A(a(a(if, a(f, x)), x), a(a(filter, f), xs))
A(a(filter, f), a(a(cons, x), xs)) → A(a(if, a(f, x)), x)
A(a(filter, f), a(a(cons, x), xs)) → A(if, a(f, x))
A(a(filter, f), a(a(cons, x), xs)) → A(f, x)
A(a(filter, f), a(a(cons, x), xs)) → A(a(filter, f), xs)
A(a(a(if, true), x), xs) → A(a(cons, x), xs)
A(a(a(if, true), x), xs) → A(cons, x)
A(a(not, f), x) → A(not2, a(f, x))
A(a(not, f), x) → A(f, x)
A(sieve, a(a(cons, x), xs)) → A(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))
A(sieve, a(a(cons, x), xs)) → A(sieve, a(a(filter, a(not, a(divides, x))), xs))
A(sieve, a(a(cons, x), xs)) → A(a(filter, a(not, a(divides, x))), xs)
A(sieve, a(a(cons, x), xs)) → A(filter, a(not, a(divides, x)))
A(sieve, a(a(cons, x), xs)) → A(not, a(divides, x))
A(sieve, a(a(cons, x), xs)) → A(divides, x)

The TRS R consists of the following rules:

a(a(divides, 0), a(s, y)) → true
a(a(divides, a(s, x)), a(s, y)) → a(a(a(div2, x), a(s, y)), y)
a(a(a(div2, x), y), 0) → a(a(divides, x), y)
a(a(a(div2, 0), y), a(s, z)) → false
a(a(a(div2, a(s, x)), y), a(s, z)) → a(a(a(div2, x), y), z)
a(a(filter, f), nil) → nil
a(a(filter, f), a(a(cons, x), xs)) → a(a(a(if, a(f, x)), x), a(a(filter, f), xs))
a(a(a(if, true), x), xs) → a(a(cons, x), xs)
a(a(a(if, false), x), xs) → xs
a(a(not, f), x) → a(not2, a(f, x))
a(not2, true) → false
a(not2, false) → true
a(sieve, nil) → nil
a(sieve, a(a(cons, x), xs)) → a(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))

The set Q consists of the following terms:

a(a(divides, 0), a(s, x0))
a(a(divides, a(s, x0)), a(s, x1))
a(a(a(div2, x0), x1), 0)
a(a(a(div2, 0), x0), a(s, x1))
a(a(a(div2, a(s, x0)), x1), a(s, x2))
a(a(filter, x0), nil)
a(a(filter, x0), a(a(cons, x1), x2))
a(a(a(if, true), x0), x1)
a(a(a(if, false), x0), x1)
a(a(not, x0), x1)
a(not2, true)
a(not2, false)
a(sieve, nil)
a(sieve, a(a(cons, x0), x1))

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

A(a(a(div2, x), y), 0) → A(a(divides, x), y)
A(a(divides, a(s, x)), a(s, y)) → A(a(a(div2, x), a(s, y)), y)
A(a(a(div2, a(s, x)), y), a(s, z)) → A(a(a(div2, x), y), z)

The TRS R consists of the following rules:

a(a(divides, 0), a(s, y)) → true
a(a(divides, a(s, x)), a(s, y)) → a(a(a(div2, x), a(s, y)), y)
a(a(a(div2, x), y), 0) → a(a(divides, x), y)
a(a(a(div2, 0), y), a(s, z)) → false
a(a(a(div2, a(s, x)), y), a(s, z)) → a(a(a(div2, x), y), z)
a(a(filter, f), nil) → nil
a(a(filter, f), a(a(cons, x), xs)) → a(a(a(if, a(f, x)), x), a(a(filter, f), xs))
a(a(a(if, true), x), xs) → a(a(cons, x), xs)
a(a(a(if, false), x), xs) → xs
a(a(not, f), x) → a(not2, a(f, x))
a(not2, true) → false
a(not2, false) → true
a(sieve, nil) → nil
a(sieve, a(a(cons, x), xs)) → a(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))

The set Q consists of the following terms:

a(a(divides, 0), a(s, x0))
a(a(divides, a(s, x0)), a(s, x1))
a(a(a(div2, x0), x1), 0)
a(a(a(div2, 0), x0), a(s, x1))
a(a(a(div2, a(s, x0)), x1), a(s, x2))
a(a(filter, x0), nil)
a(a(filter, x0), a(a(cons, x1), x2))
a(a(a(if, true), x0), x1)
a(a(a(if, false), x0), x1)
a(a(not, x0), x1)
a(not2, true)
a(not2, false)
a(sieve, nil)
a(sieve, a(a(cons, x0), x1))

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04]. Here, we combined the reduction pair processor with the A-transformation [FROCOS05] which results in the following intermediate Q-DP Problem.
The a-transformed P is

div21(x, y, 0) → divides1(x, y)
divides1(s(x), s(y)) → div21(x, s(y), y)
div21(s(x), y, s(z)) → div21(x, y, z)

The a-transformed usable rules are
none


The following pairs can be oriented strictly and are deleted.


A(a(divides, a(s, x)), a(s, y)) → A(a(a(div2, x), a(s, y)), y)
A(a(a(div2, a(s, x)), y), a(s, z)) → A(a(a(div2, x), y), z)
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
div21(x1, x2, x3)  =  x1
divides1(x1, x2)  =  x1
s(x1)  =  s(x1)

Lexicographic Path Order [LPO].
Precedence:
trivial

The following usable rules [FROCOS05] were oriented: none

(9) Obligation:

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

A(a(a(div2, x), y), 0) → A(a(divides, x), y)

The TRS R consists of the following rules:

a(a(divides, 0), a(s, y)) → true
a(a(divides, a(s, x)), a(s, y)) → a(a(a(div2, x), a(s, y)), y)
a(a(a(div2, x), y), 0) → a(a(divides, x), y)
a(a(a(div2, 0), y), a(s, z)) → false
a(a(a(div2, a(s, x)), y), a(s, z)) → a(a(a(div2, x), y), z)
a(a(filter, f), nil) → nil
a(a(filter, f), a(a(cons, x), xs)) → a(a(a(if, a(f, x)), x), a(a(filter, f), xs))
a(a(a(if, true), x), xs) → a(a(cons, x), xs)
a(a(a(if, false), x), xs) → xs
a(a(not, f), x) → a(not2, a(f, x))
a(not2, true) → false
a(not2, false) → true
a(sieve, nil) → nil
a(sieve, a(a(cons, x), xs)) → a(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))

The set Q consists of the following terms:

a(a(divides, 0), a(s, x0))
a(a(divides, a(s, x0)), a(s, x1))
a(a(a(div2, x0), x1), 0)
a(a(a(div2, 0), x0), a(s, x1))
a(a(a(div2, a(s, x0)), x1), a(s, x2))
a(a(filter, x0), nil)
a(a(filter, x0), a(a(cons, x1), x2))
a(a(a(if, true), x0), x1)
a(a(a(if, false), x0), x1)
a(a(not, x0), x1)
a(not2, true)
a(not2, false)
a(sieve, nil)
a(sieve, a(a(cons, x0), x1))

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

(10) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.

(11) TRUE

(12) Obligation:

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

A(a(filter, f), a(a(cons, x), xs)) → A(a(filter, f), xs)
A(a(filter, f), a(a(cons, x), xs)) → A(f, x)
A(a(not, f), x) → A(f, x)
A(sieve, a(a(cons, x), xs)) → A(sieve, a(a(filter, a(not, a(divides, x))), xs))
A(sieve, a(a(cons, x), xs)) → A(a(filter, a(not, a(divides, x))), xs)

The TRS R consists of the following rules:

a(a(divides, 0), a(s, y)) → true
a(a(divides, a(s, x)), a(s, y)) → a(a(a(div2, x), a(s, y)), y)
a(a(a(div2, x), y), 0) → a(a(divides, x), y)
a(a(a(div2, 0), y), a(s, z)) → false
a(a(a(div2, a(s, x)), y), a(s, z)) → a(a(a(div2, x), y), z)
a(a(filter, f), nil) → nil
a(a(filter, f), a(a(cons, x), xs)) → a(a(a(if, a(f, x)), x), a(a(filter, f), xs))
a(a(a(if, true), x), xs) → a(a(cons, x), xs)
a(a(a(if, false), x), xs) → xs
a(a(not, f), x) → a(not2, a(f, x))
a(not2, true) → false
a(not2, false) → true
a(sieve, nil) → nil
a(sieve, a(a(cons, x), xs)) → a(a(cons, x), a(sieve, a(a(filter, a(not, a(divides, x))), xs)))

The set Q consists of the following terms:

a(a(divides, 0), a(s, x0))
a(a(divides, a(s, x0)), a(s, x1))
a(a(a(div2, x0), x1), 0)
a(a(a(div2, 0), x0), a(s, x1))
a(a(a(div2, a(s, x0)), x1), a(s, x2))
a(a(filter, x0), nil)
a(a(filter, x0), a(a(cons, x1), x2))
a(a(a(if, true), x0), x1)
a(a(a(if, false), x0), x1)
a(a(not, x0), x1)
a(not2, true)
a(not2, false)
a(sieve, nil)
a(sieve, a(a(cons, x0), x1))

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