(0) Obligation:
Relative term rewrite system:
The relative TRS consists of the following R rules:
minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
div(0, s(y)) → 0
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
divL(x, nil) → x
divL(x, cons(y, xs)) → divL(div(x, y), xs)
app(nil, y) → y
app(cons(n, x), y) → cons(n, app(x, y))
reverse(nil) → nil
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
shuffle(nil) → nil
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
less_leaves(x, leaf) → false
less_leaves(leaf, cons(w, z)) → true
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
The relative TRS consists of the following S rules:
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
(1) RelTRStoRelADPProof (EQUIVALENT transformation)
We upgrade the RelTRS problem to an equivalent Relative ADP Problem [IJCAR24].
(2) Obligation:
Relative ADP Problem with
absolute ADPs:
minus(x, 0) → x
minus(s(x), s(y)) → MINUS(x, y)
div(0, s(y)) → 0
div(s(x), s(y)) → s(DIV(minus(x, y), s(y)))
div(s(x), s(y)) → s(div(MINUS(x, y), s(y)))
divL(x, nil) → x
divL(x, cons(y, xs)) → DIVL(div(x, y), xs)
divL(x, cons(y, xs)) → divL(DIV(x, y), xs)
app(nil, y) → y
app(cons(n, x), y) → cons(n, APP(x, y))
reverse(nil) → nil
reverse(cons(n, x)) → APP(reverse(x), cons(n, nil))
reverse(cons(n, x)) → app(REVERSE(x), cons(n, nil))
shuffle(nil) → nil
shuffle(cons(n, x)) → cons(n, SHUFFLE(reverse(x)))
shuffle(cons(n, x)) → cons(n, shuffle(REVERSE(x)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, CONCAT(v, y))
less_leaves(x, leaf) → false
less_leaves(leaf, cons(w, z)) → true
less_leaves(cons(u, v), cons(w, z)) → LESS_LEAVES(concat(u, v), concat(w, z))
less_leaves(cons(u, v), cons(w, z)) → less_leaves(CONCAT(u, v), concat(w, z))
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), CONCAT(w, z))
and relative ADPs:
divL(z, cons(x, cons(y, xs))) → DIVL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → SHUFFLE(cons(m, cons(n, x)))
(3) RelADPDepGraphProof (EQUIVALENT transformation)
We use the relative dependency graph processor [IJCAR24].
The approximation of the Relative Dependency Graph contains:
7 SCCs with nodes from P_abs,
0 Lassos,
Result: This relative DT problem is equivalent to 7 subproblems.
(4) Complex Obligation (AND)
(5) Obligation:
Relative ADP Problem with
absolute ADPs:
minus(s(x), s(y)) → MINUS(x, y)
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(6) RelADPCleverAfsProof (SOUND transformation)
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
Furthermore, We use an argument filter [LPAR04].
Filtering:MINUS_2 = 0
true =
less_leaves_2 =
app_2 =
divL_2 =
concat_2 =
leaf =
xs =
shuffle_1 =
nil =
false =
s_1 =
reverse_1 =
div_2 =
0 =
minus_2 = 1
cons_2 =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
MINUS(x1, x2) = MINUS(x2)
s(x1) = s(x1)
div(x1, x2) = div(x1, x2)
minus(x1, x2) = x1
0 = 0
Recursive path order with status [RPO].
Quasi-Precedence:
MINUS1 > s1
div2 > s1
0 > s1
Status:
MINUS1: [1]
s1: multiset
div2: [2,1]
0: multiset
(7) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MINUS(s0(y)) → MINUS(y)
The TRS R consists of the following rules:
div0(00, s0(y)) → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div0(s0(x), s0(y)) → s0(div0(minus(x), s0(y)))
concat0(leaf0, y) → y
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
divL0(x, cons0(y, xs0)) → divL0(div0(x, y), xs0)
shuffle0(nil0) → nil0
divL0(x, nil0) → x
reverse0(nil0) → nil0
less_leaves0(x, leaf0) → false0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
less_leaves0(leaf0, cons0(w, z)) → true0
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
minus(x) → x
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(8) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:
MINUS(s0(y)) → MINUS(y)
Strictly oriented rules of the TRS R:
div0(00, s0(y)) → 00
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
divL0(x, cons0(y, xs0)) → divL0(div0(x, y), xs0)
divL0(x, nil0) → x
reverse0(nil0) → nil0
less_leaves0(leaf0, cons0(w, z)) → true0
minus(s0(x)) → minus(x)
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Used ordering: Polynomial interpretation [POLO]:
POL(00) = 0
POL(MINUS(x1)) = 2·x1
POL(app0(x1, x2)) = x1 + x2
POL(concat0(x1, x2)) = 2·x1 + x2
POL(cons0(x1, x2)) = 2 + 2·x1 + x2
POL(div0(x1, x2)) = x1 + x2
POL(divL0(x1, x2)) = 2 + x1 + x2
POL(false0) = 2
POL(leaf0) = 0
POL(less_leaves0(x1, x2)) = 2 + 2·x1 + x2
POL(minus(x1)) = x1
POL(nil0) = 0
POL(reverse0(x1)) = 1 + x1
POL(s0(x1)) = 2 + x1
POL(shuffle0(x1)) = 2·x1
POL(true0) = 0
POL(xs0) = 2
(9) Obligation:
Q DP problem:
P is empty.
The TRS R consists of the following rules:
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div0(s0(x), s0(y)) → s0(div0(minus(x), s0(y)))
concat0(leaf0, y) → y
shuffle0(nil0) → nil0
less_leaves0(x, leaf0) → false0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(x) → x
Q is empty.
We have to consider all (P,Q,R)-chains.
(10) PisEmptyProof (EQUIVALENT transformation)
The TRS P is empty. Hence, there is no (P,Q,R) chain.
(11) YES
(12) Obligation:
Relative ADP Problem with
absolute ADPs:
app(cons(n, x), y) → cons(n, APP(x, y))
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(13) RelADPCleverAfsProof (SOUND transformation)
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
Furthermore, We use an argument filter [LPAR04].
Filtering:true =
less_leaves_2 =
app_2 =
divL_2 =
concat_2 =
leaf =
xs =
shuffle_1 =
APP_2 =
nil =
false =
s_1 =
reverse_1 =
div_2 = 0, 1
0 =
minus_2 = 1
cons_2 =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
APP(x1, x2) = APP(x1, x2)
cons(x1, x2) = cons(x1, x2)
div(x1, x2) = div
s(x1) = x1
minus(x1, x2) = x1
0 = 0
Recursive path order with status [RPO].
Quasi-Precedence:
cons2 > APP2
[div, 0]
Status:
APP2: [2,1]
cons2: multiset
div: []
0: multiset
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP0(cons0(n, x), y) → APP0(x, y)
The TRS R consists of the following rules:
div → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div → s0(div)
concat0(leaf0, y) → y
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
divL0(x, cons0(y, xs0)) → divL0(div, xs0)
shuffle0(nil0) → nil0
divL0(x, nil0) → x
reverse0(nil0) → nil0
less_leaves0(x, leaf0) → false0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
less_leaves0(leaf0, cons0(w, z)) → true0
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
minus(x) → x
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(15) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:
APP0(cons0(n, x), y) → APP0(x, y)
Strictly oriented rules of the TRS R:
concat0(leaf0, y) → y
divL0(x, cons0(y, xs0)) → divL0(div, xs0)
shuffle0(nil0) → nil0
divL0(x, nil0) → x
less_leaves0(x, leaf0) → false0
less_leaves0(leaf0, cons0(w, z)) → true0
minus(x) → x
Used ordering: Polynomial interpretation [POLO]:
POL(00) = 0
POL(APP0(x1, x2)) = x1 + x2
POL(app0(x1, x2)) = x1 + x2
POL(concat0(x1, x2)) = 2 + x1 + x2
POL(cons0(x1, x2)) = 2 + x1 + x2
POL(div) = 0
POL(divL0(x1, x2)) = 1 + 2·x1 + x2
POL(false0) = 0
POL(leaf0) = 0
POL(less_leaves0(x1, x2)) = 1 + 2·x1 + 2·x2
POL(minus(x1)) = 2 + 2·x1
POL(nil0) = 0
POL(reverse0(x1)) = x1
POL(s0(x1)) = x1
POL(shuffle0(x1)) = 2 + x1
POL(true0) = 0
POL(xs0) = 0
(16) Obligation:
Q DP problem:
P is empty.
The TRS R consists of the following rules:
div → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div → s0(div)
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
reverse0(nil0) → nil0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(17) PisEmptyProof (EQUIVALENT transformation)
The TRS P is empty. Hence, there is no (P,Q,R) chain.
(18) YES
(19) Obligation:
Relative ADP Problem with
absolute ADPs:
div(s(x), s(y)) → s(DIV(minus(x, y), s(y)))
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(20) RelADPCleverAfsProof (SOUND transformation)
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
Furthermore, We use an argument filter [LPAR04].
Filtering:true =
less_leaves_2 =
app_2 =
divL_2 =
concat_2 =
leaf =
xs =
shuffle_1 =
nil =
false =
s_1 =
reverse_1 =
div_2 = 1
0 =
minus_2 = 1
cons_2 =
DIV_2 =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
DIV(x1, x2) = DIV(x1, x2)
s(x1) = s(x1)
minus(x1, x2) = x1
0 = 0
div(x1, x2) = div(x1)
Recursive path order with status [RPO].
Quasi-Precedence:
0 > [DIV2, s1, div1]
Status:
DIV2: multiset
s1: multiset
0: multiset
div1: multiset
(21) Obligation:
Q DP problem:
The TRS P consists of the following rules:
DIV0(s0(x), s0(y)) → DIV0(minus(x), s0(y))
The TRS R consists of the following rules:
div(00) → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div(s0(x)) → s0(div(minus(x)))
concat0(leaf0, y) → y
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
divL0(x, cons0(y, xs0)) → divL0(div(x), xs0)
shuffle0(nil0) → nil0
divL0(x, nil0) → x
reverse0(nil0) → nil0
less_leaves0(x, leaf0) → false0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
less_leaves0(leaf0, cons0(w, z)) → true0
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
minus(x) → x
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(22) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented rules of the TRS R:
divL0(x, cons0(y, xs0)) → divL0(div(x), xs0)
divL0(x, nil0) → x
reverse0(nil0) → nil0
less_leaves0(x, leaf0) → false0
less_leaves0(leaf0, cons0(w, z)) → true0
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Used ordering: Polynomial interpretation [POLO]:
POL(00) = 0
POL(DIV0(x1, x2)) = x1 + x2
POL(app0(x1, x2)) = x1 + x2
POL(concat0(x1, x2)) = x1 + x2
POL(cons0(x1, x2)) = 2 + x1 + x2
POL(div(x1)) = x1
POL(divL0(x1, x2)) = 2 + x1 + x2
POL(false0) = 0
POL(leaf0) = 0
POL(less_leaves0(x1, x2)) = 1 + 2·x1 + x2
POL(minus(x1)) = x1
POL(nil0) = 0
POL(reverse0(x1)) = 1 + x1
POL(s0(x1)) = 2·x1
POL(shuffle0(x1)) = 2·x1
POL(true0) = 2
POL(xs0) = 2
(23) Obligation:
Q DP problem:
The TRS P consists of the following rules:
DIV0(s0(x), s0(y)) → DIV0(minus(x), s0(y))
The TRS R consists of the following rules:
div(00) → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div(s0(x)) → s0(div(minus(x)))
concat0(leaf0, y) → y
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
shuffle0(nil0) → nil0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
minus(x) → x
Q is empty.
We have to consider all (P,Q,R)-chains.
(24) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented rules of the TRS R:
concat0(leaf0, y) → y
Used ordering: Polynomial interpretation [POLO]:
POL(00) = 0
POL(DIV0(x1, x2)) = x1 + x2
POL(app0(x1, x2)) = x1 + x2
POL(concat0(x1, x2)) = x1 + x2
POL(cons0(x1, x2)) = x1 + x2
POL(div(x1)) = x1
POL(divL0(x1, x2)) = x1 + x2
POL(leaf0) = 2
POL(minus(x1)) = x1
POL(nil0) = 0
POL(reverse0(x1)) = x1
POL(s0(x1)) = x1
POL(shuffle0(x1)) = 2·x1
POL(xs0) = 0
(25) Obligation:
Q DP problem:
The TRS P consists of the following rules:
DIV0(s0(x), s0(y)) → DIV0(minus(x), s0(y))
The TRS R consists of the following rules:
div(00) → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div(s0(x)) → s0(div(minus(x)))
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
shuffle0(nil0) → nil0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
minus(x) → x
Q is empty.
We have to consider all (P,Q,R)-chains.
(26) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:
DIV0(s0(x), s0(y)) → DIV0(minus(x), s0(y))
Strictly oriented rules of the TRS R:
div(00) → 00
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
shuffle0(nil0) → nil0
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
minus(s0(x)) → minus(x)
Used ordering: Polynomial interpretation [POLO]:
POL(00) = 2
POL(DIV0(x1, x2)) = x1 + x2
POL(app0(x1, x2)) = x1 + x2
POL(concat0(x1, x2)) = 2·x1 + x2
POL(cons0(x1, x2)) = 2 + x1 + x2
POL(div(x1)) = 2 + x1
POL(divL0(x1, x2)) = x1 + x2
POL(minus(x1)) = x1
POL(nil0) = 0
POL(reverse0(x1)) = x1
POL(s0(x1)) = 1 + x1
POL(shuffle0(x1)) = 2 + 2·x1
POL(xs0) = 0
(27) Obligation:
Q DP problem:
P is empty.
The TRS R consists of the following rules:
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div(s0(x)) → s0(div(minus(x)))
app0(cons0(n, x), y) → cons0(n, app0(x, y))
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(x) → x
Q is empty.
We have to consider all (P,Q,R)-chains.
(28) PisEmptyProof (EQUIVALENT transformation)
The TRS P is empty. Hence, there is no (P,Q,R) chain.
(29) YES
(30) Obligation:
Relative ADP Problem with
absolute ADPs:
concat(cons(u, v), y) → cons(u, CONCAT(v, y))
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(31) RelADPCleverAfsProof (SOUND transformation)
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
Furthermore, We use an argument filter [LPAR04].
Filtering:true =
CONCAT_2 =
less_leaves_2 =
app_2 =
concat_2 =
divL_2 =
leaf =
xs =
shuffle_1 =
nil =
false =
s_1 =
reverse_1 =
div_2 = 0, 1
0 =
minus_2 = 1
cons_2 =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
CONCAT(x1, x2) = CONCAT(x1, x2)
cons(x1, x2) = cons(x1, x2)
div(x1, x2) = div
s(x1) = x1
minus(x1, x2) = x1
0 = 0
Recursive path order with status [RPO].
Quasi-Precedence:
cons2 > CONCAT2
[div, 0]
Status:
CONCAT2: [2,1]
cons2: multiset
div: multiset
0: multiset
(32) Obligation:
Q DP problem:
The TRS P consists of the following rules:
CONCAT0(cons0(u, v), y) → CONCAT0(v, y)
The TRS R consists of the following rules:
div → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div → s0(div)
concat0(leaf0, y) → y
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
divL0(x, cons0(y, xs0)) → divL0(div, xs0)
shuffle0(nil0) → nil0
divL0(x, nil0) → x
reverse0(nil0) → nil0
less_leaves0(x, leaf0) → false0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
less_leaves0(leaf0, cons0(w, z)) → true0
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
minus(x) → x
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(33) MRRProof (EQUIVALENT transformation)
By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:
CONCAT0(cons0(u, v), y) → CONCAT0(v, y)
Strictly oriented rules of the TRS R:
concat0(leaf0, y) → y
divL0(x, cons0(y, xs0)) → divL0(div, xs0)
shuffle0(nil0) → nil0
divL0(x, nil0) → x
less_leaves0(x, leaf0) → false0
less_leaves0(leaf0, cons0(w, z)) → true0
minus(x) → x
Used ordering: Polynomial interpretation [POLO]:
POL(00) = 0
POL(CONCAT0(x1, x2)) = x1 + x2
POL(app0(x1, x2)) = x1 + x2
POL(concat0(x1, x2)) = 2 + x1 + x2
POL(cons0(x1, x2)) = 2 + x1 + x2
POL(div) = 0
POL(divL0(x1, x2)) = 1 + 2·x1 + x2
POL(false0) = 0
POL(leaf0) = 0
POL(less_leaves0(x1, x2)) = 1 + 2·x1 + 2·x2
POL(minus(x1)) = 2 + 2·x1
POL(nil0) = 0
POL(reverse0(x1)) = x1
POL(s0(x1)) = x1
POL(shuffle0(x1)) = 2 + x1
POL(true0) = 0
POL(xs0) = 0
(34) Obligation:
Q DP problem:
P is empty.
The TRS R consists of the following rules:
div → 00
divL0(z, cons0(x, cons0(y, xs0))) → divL0(z, cons0(y, cons0(x, xs0)))
shuffle0(cons0(n, cons0(m, x))) → shuffle0(cons0(m, cons0(n, x)))
div → s0(div)
concat0(cons0(u, v), y) → cons0(u, concat0(v, y))
reverse0(nil0) → nil0
app0(cons0(n, x), y) → cons0(n, app0(x, y))
shuffle0(cons0(n, x)) → cons0(n, shuffle0(reverse0(x)))
reverse0(cons0(n, x)) → app0(reverse0(x), cons0(n, nil0))
app0(nil0, y) → y
minus(s0(x)) → minus(x)
less_leaves0(cons0(u, v), cons0(w, z)) → less_leaves0(concat0(u, v), concat0(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(35) PisEmptyProof (EQUIVALENT transformation)
The TRS P is empty. Hence, there is no (P,Q,R) chain.
(36) YES
(37) Obligation:
Relative ADP Problem with
absolute ADPs:
less_leaves(cons(u, v), cons(w, z)) → LESS_LEAVES(concat(u, v), concat(w, z))
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(38) RelADPDerelatifyingProof (EQUIVALENT transformation)
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
(39) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LESS_LEAVES(cons(u, v), cons(w, z)) → LESS_LEAVES(concat(u, v), concat(w, z))
The TRS R consists of the following rules:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(40) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04,JAR06].
The following pairs can be oriented strictly and are deleted.
LESS_LEAVES(cons(u, v), cons(w, z)) → LESS_LEAVES(concat(u, v), concat(w, z))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:
POL( div(x1, x2) ) = x2 + 1 |
POL( divL(x1, x2) ) = x1 + 2x2 |
POL( cons(x1, x2) ) = x1 + x2 + 1 |
POL( shuffle(x1) ) = x1 + 2 |
POL( minus(x1, x2) ) = x1 + x2 |
POL( concat(x1, x2) ) = x1 + x2 |
POL( less_leaves(x1, x2) ) = 0 |
POL( app(x1, x2) ) = x1 + x2 |
POL( LESS_LEAVES(x1, x2) ) = x1 + x2 |
The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(41) Obligation:
Q DP problem:
P is empty.
The TRS R consists of the following rules:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(42) PisEmptyProof (EQUIVALENT transformation)
The TRS P is empty. Hence, there is no (P,Q,R) chain.
(43) YES
(44) Obligation:
Relative ADP Problem with
absolute ADPs:
reverse(cons(n, x)) → app(REVERSE(x), cons(n, nil))
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(45) RelADPDerelatifyingProof (EQUIVALENT transformation)
We use the first derelatifying processor [IJCAR24].
There are no annotations in relative ADPs, so the relative ADP problem can be transformed into a non-relative DP problem.
(46) Obligation:
Q DP problem:
The TRS P consists of the following rules:
REVERSE(cons(n, x)) → REVERSE(x)
The TRS R consists of the following rules:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(47) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04,JAR06].
The following pairs can be oriented strictly and are deleted.
REVERSE(cons(n, x)) → REVERSE(x)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:
POL( div(x1, x2) ) = x1 + 2 |
POL( divL(x1, x2) ) = x1 + x2 + 1 |
POL( cons(x1, x2) ) = x2 + 2 |
POL( shuffle(x1) ) = 2x1 + 1 |
POL( minus(x1, x2) ) = x1 |
POL( concat(x1, x2) ) = 2x1 + x2 + 2 |
POL( reverse(x1) ) = x1 + 1 |
POL( less_leaves(x1, x2) ) = 2 |
POL( app(x1, x2) ) = x1 + x2 |
The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(48) Obligation:
Q DP problem:
P is empty.
The TRS R consists of the following rules:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → shuffle(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
Q is empty.
We have to consider all (P,Q,R)-chains.
(49) PisEmptyProof (EQUIVALENT transformation)
The TRS P is empty. Hence, there is no (P,Q,R) chain.
(50) YES
(51) Obligation:
Relative ADP Problem with
absolute ADPs:
shuffle(cons(n, x)) → cons(n, SHUFFLE(reverse(x)))
and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → SHUFFLE(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(52) RelADPReductionPairProof (EQUIVALENT transformation)
We use the reduction pair processor [IJCAR24].
The following rules can be oriented strictly (l^# > ann(r))
and therefore we can remove all of its annotations in the right-hand side:
Absolute ADPs:
shuffle(cons(n, x)) → cons(n, SHUFFLE(reverse(x)))
Relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
The remaining rules can at least be oriented weakly:
Ordered with Polynomial interpretation [POLO]:
POL(0) = 0
POL(APP(x1, x2)) = 2·x1·x2 + 2·x2
POL(CONCAT(x1, x2)) = 2 + 2·x1
POL(DIV(x1, x2)) = 2 + x2
POL(DIVL(x1, x2)) = 2 + 3·x1 + x1·x2
POL(LESS_LEAVES(x1, x2)) = 2
POL(MINUS(x1, x2)) = 2
POL(REVERSE(x1)) = 2 + 2·x1
POL(SHUFFLE(x1)) = 2 + 2·x1
POL(app(x1, x2)) = x1 + x2
POL(concat(x1, x2)) = 1 + x1 + x2
POL(cons(x1, x2)) = 1 + x1 + x2
POL(div(x1, x2)) = 0
POL(divL(x1, x2)) = 2 + x1 + 2·x2
POL(false) = 0
POL(leaf) = 0
POL(less_leaves(x1, x2)) = 3·x2
POL(minus(x1, x2)) = 2·x1
POL(nil) = 0
POL(reverse(x1)) = x1
POL(s(x1)) = 3·x1
POL(shuffle(x1)) = 3·x1
POL(true) = 1
POL(xs) = 3
(53) Obligation:
Relative ADP Problem with
No absolute ADPs, and relative ADPs:
div(0, s(y)) → 0
divL(z, cons(x, cons(y, xs))) → divL(z, cons(y, cons(x, xs)))
shuffle(cons(n, cons(m, x))) → SHUFFLE(cons(m, cons(n, x)))
div(s(x), s(y)) → s(div(minus(x, y), s(y)))
concat(leaf, y) → y
concat(cons(u, v), y) → cons(u, concat(v, y))
divL(x, cons(y, xs)) → divL(div(x, y), xs)
shuffle(nil) → nil
divL(x, nil) → x
reverse(nil) → nil
less_leaves(x, leaf) → false
app(cons(n, x), y) → cons(n, app(x, y))
shuffle(cons(n, x)) → cons(n, shuffle(reverse(x)))
less_leaves(leaf, cons(w, z)) → true
reverse(cons(n, x)) → app(reverse(x), cons(n, nil))
app(nil, y) → y
minus(s(x), s(y)) → minus(x, y)
minus(x, 0) → x
less_leaves(cons(u, v), cons(w, z)) → less_leaves(concat(u, v), concat(w, z))
(54) DAbsisEmptyProof (EQUIVALENT transformation)
The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.
(55) YES