YES Termination proof of AProVE_24_subsets.ari

(0) Obligation:

Relative term rewrite system:
The relative TRS consists of the following R rules:

remove(nil, x) → nil
remove(cons(x, xs), 0) → cons(x, xs)
remove(cons(x, xs), s(y)) → remove(xs, y)
first(nil, x) → nil
first(cons(x, xs), 0) → nil
first(cons(x, xs), s(y)) → cons(x, first(xs, y))
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(remove(xs, y), s(y)))

The relative TRS consists of the following S rules:

sublist(cons(x, cons(y, xs)), z) → sublist(cons(y, cons(x, xs)), z)

(1) RelTRStoRelADPProof (EQUIVALENT transformation)

We upgrade the RelTRS problem to an equivalent Relative ADP Problem [IJCAR24].

(2) Obligation:

Relative ADP Problem with
absolute ADPs:

remove(nil, x) → nil
remove(cons(x, xs), 0) → cons(x, xs)
remove(cons(x, xs), s(y)) → REMOVE(xs, y)
first(nil, x) → nil
first(cons(x, xs), 0) → nil
first(cons(x, xs), s(y)) → cons(x, FIRST(xs, y))
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
sublist(cons(x, xs), s(y)) → cons(cons(x, FIRST(xs, y)), sublist(remove(xs, y), s(y)))
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), SUBLIST(remove(xs, y), s(y)))
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(REMOVE(xs, y), s(y)))

and relative ADPs:

sublist(cons(x, cons(y, xs)), z) → SUBLIST(cons(y, cons(x, xs)), z)

(3) RelADPDepGraphProof (EQUIVALENT transformation)

We use the relative dependency graph processor [IJCAR24].
The approximation of the Relative Dependency Graph contains:
3 SCCs with nodes from P_abs,
0 Lassos,
Result: This relative DT problem is equivalent to 3 subproblems.

(4) Complex Obligation (AND)

(5) Obligation:

Relative ADP Problem with
absolute ADPs:

first(cons(x, xs), s(y)) → cons(x, FIRST(xs, y))

and relative ADPs:

remove(cons(x, xs), 0) → cons(x, xs)
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(remove(xs, y), s(y)))
first(nil, x) → nil
remove(nil, x) → nil
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
sublist(cons(x, cons(y, xs)), z) → sublist(cons(y, cons(x, xs)), z)
remove(cons(x, xs), s(y)) → remove(xs, y)
first(cons(x, xs), 0) → nil

(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:s_1 = FIRST_2 = 0 = cons_2 = 0 remove_2 = 1 first_2 = 0 sublist_2 = 0 nil =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
FIRST(x1, x2)  =  FIRST(x1, x2)
cons(x1, x2)  =  x2
s(x1)  =  s(x1)
sublist(x1, x2)  =  x2
first(x1, x2)  =  first(x2)
remove(x1, x2)  =  remove(x1)
0  =  0
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:

s1 > FIRST2 > nil
first1 > nil
remove1 > nil
0 > nil

Status:
FIRST2: multiset
s1: multiset
first1: [1]
remove1: [1]
0: multiset
nil: multiset

(7) Obligation:

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

FIRST0(cons(xs), s0(y)) → FIRST0(xs, y)

The TRS R consists of the following rules:

remove(cons(xs)) → cons(xs)
sublist(s0(y)) → cons(sublist(s0(y)))
first(x) → nil0
remove(nil0) → nil0
sublist(x) → nil0
sublist(00) → nil0
sublist(z) → sublist(z)
first(s0(y)) → cons(first(y))
remove(cons(xs)) → remove(xs)
first(00) → nil0

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 rules of the TRS R:

remove(cons(xs)) → cons(xs)
first(x) → nil0
remove(nil0) → nil0
sublist(x) → nil0
sublist(00) → nil0
first(00) → nil0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(FIRST0(x1, x2)) = x1 + x2   
POL(cons(x1)) = x1   
POL(first(x1)) = 2 + 2·x1   
POL(nil0) = 0   
POL(remove(x1)) = 1 + 2·x1   
POL(s0(x1)) = x1   
POL(sublist(x1)) = 1 + 2·x1   

(9) Obligation:

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

FIRST0(cons(xs), s0(y)) → FIRST0(xs, y)

The TRS R consists of the following rules:

sublist(s0(y)) → cons(sublist(s0(y)))
sublist(z) → sublist(z)
first(s0(y)) → cons(first(y))
remove(cons(xs)) → remove(xs)

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

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

FIRST0(cons(xs), s0(y)) → FIRST0(xs, y)

Strictly oriented rules of the TRS R:

first(s0(y)) → cons(first(y))

Used ordering: Polynomial interpretation [POLO]:

POL(FIRST0(x1, x2)) = x1 + x2   
POL(cons(x1)) = x1   
POL(first(x1)) = 1 + x1   
POL(remove(x1)) = x1   
POL(s0(x1)) = 1 + 2·x1   
POL(sublist(x1)) = 1 + 2·x1   

(11) Obligation:

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

sublist(s0(y)) → cons(sublist(s0(y)))
sublist(z) → sublist(z)
remove(cons(xs)) → remove(xs)

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

(12) PisEmptyProof (EQUIVALENT transformation)

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

(13) YES

(14) Obligation:

Relative ADP Problem with
absolute ADPs:

remove(cons(x, xs), s(y)) → REMOVE(xs, y)

and relative ADPs:

remove(cons(x, xs), 0) → cons(x, xs)
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(remove(xs, y), s(y)))
first(nil, x) → nil
remove(nil, x) → nil
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
sublist(cons(x, cons(y, xs)), z) → sublist(cons(y, cons(x, xs)), z)
first(cons(x, xs), s(y)) → cons(x, first(xs, y))
first(cons(x, xs), 0) → nil

(15) 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:s_1 = REMOVE_2 = 0 = remove_2 = 1 cons_2 = 0 first_2 = 0 sublist_2 = 0 nil =
Found this filtering by looking at the following order that orders at least one DP strictly:Combined order from the following AFS and order.
REMOVE(x1, x2)  =  REMOVE(x1, x2)
cons(x1, x2)  =  x2
s(x1)  =  s(x1)
sublist(x1, x2)  =  x2
first(x1, x2)  =  first(x2)
remove(x1, x2)  =  remove(x1)
0  =  0
nil  =  nil

Recursive path order with status [RPO].
Quasi-Precedence:

s1 > REMOVE2 > nil
first1 > nil
remove1 > nil
0 > nil

Status:
REMOVE2: multiset
s1: multiset
first1: [1]
remove1: [1]
0: multiset
nil: multiset

(16) Obligation:

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

REMOVE0(cons(xs), s0(y)) → REMOVE0(xs, y)

The TRS R consists of the following rules:

remove(cons(xs)) → cons(xs)
sublist(s0(y)) → cons(sublist(s0(y)))
first(x) → nil0
remove(nil0) → nil0
sublist(x) → nil0
sublist(00) → nil0
sublist(z) → sublist(z)
first(s0(y)) → cons(first(y))
remove(cons(xs)) → remove(xs)
first(00) → nil0

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

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

remove(cons(xs)) → cons(xs)
first(x) → nil0
remove(nil0) → nil0
sublist(x) → nil0
sublist(00) → nil0
first(00) → nil0

Used ordering: Polynomial interpretation [POLO]:

POL(00) = 0   
POL(REMOVE0(x1, x2)) = x1 + x2   
POL(cons(x1)) = x1   
POL(first(x1)) = 2 + 2·x1   
POL(nil0) = 0   
POL(remove(x1)) = 1 + 2·x1   
POL(s0(x1)) = x1   
POL(sublist(x1)) = 1 + 2·x1   

(18) Obligation:

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

REMOVE0(cons(xs), s0(y)) → REMOVE0(xs, y)

The TRS R consists of the following rules:

sublist(s0(y)) → cons(sublist(s0(y)))
sublist(z) → sublist(z)
first(s0(y)) → cons(first(y))
remove(cons(xs)) → remove(xs)

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

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

REMOVE0(cons(xs), s0(y)) → REMOVE0(xs, y)

Strictly oriented rules of the TRS R:

first(s0(y)) → cons(first(y))

Used ordering: Polynomial interpretation [POLO]:

POL(REMOVE0(x1, x2)) = x1 + x2   
POL(cons(x1)) = x1   
POL(first(x1)) = 1 + x1   
POL(remove(x1)) = x1   
POL(s0(x1)) = 1 + 2·x1   
POL(sublist(x1)) = 1 + 2·x1   

(20) Obligation:

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

sublist(s0(y)) → cons(sublist(s0(y)))
sublist(z) → sublist(z)
remove(cons(xs)) → remove(xs)

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

(21) PisEmptyProof (EQUIVALENT transformation)

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

(22) YES

(23) Obligation:

Relative ADP Problem with
absolute ADPs:

sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), SUBLIST(remove(xs, y), s(y)))

and relative ADPs:

remove(cons(x, xs), 0) → cons(x, xs)
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(remove(xs, y), s(y)))
first(nil, x) → nil
remove(nil, x) → nil
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
sublist(cons(x, cons(y, xs)), z) → SUBLIST(cons(y, cons(x, xs)), z)
first(cons(x, xs), s(y)) → cons(x, first(xs, y))
remove(cons(x, xs), s(y)) → remove(xs, y)
first(cons(x, xs), 0) → nil

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


sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), SUBLIST(remove(xs, y), s(y)))

Relative ADPs:

remove(cons(x, xs), 0) → cons(x, xs)
sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(remove(xs, y), s(y)))
first(nil, x) → nil
remove(nil, x) → nil
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
first(cons(x, xs), s(y)) → cons(x, first(xs, y))
remove(cons(x, xs), s(y)) → remove(xs, y)
first(cons(x, xs), 0) → nil


The remaining rules can at least be oriented weakly:

Ordered with Polynomial interpretation [POLO]:

POL(0) = 0   
POL(FIRST(x1, x2)) = 2   
POL(REMOVE(x1, x2)) = 2   
POL(SUBLIST(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(cons(x1, x2)) = 3 + 2·x2   
POL(first(x1, x2)) = x1   
POL(nil) = 0   
POL(remove(x1, x2)) = x1   
POL(s(x1)) = 3   
POL(sublist(x1, x2)) = 3 + 3·x1   

(25) Obligation:

Relative ADP Problem with
No absolute ADPs, and relative ADPs:

sublist(cons(x, xs), s(y)) → cons(cons(x, first(xs, y)), sublist(remove(xs, y), s(y)))
remove(cons(x, xs), 0) → cons(x, xs)
first(nil, x) → nil
remove(nil, x) → nil
sublist(nil, x) → nil
sublist(cons(x, xs), 0) → nil
sublist(cons(x, cons(y, xs)), z) → SUBLIST(cons(y, cons(x, xs)), z)
first(cons(x, xs), s(y)) → cons(x, first(xs, y))
remove(cons(x, xs), s(y)) → remove(xs, y)
first(cons(x, xs), 0) → nil

(26) DAbsisEmptyProof (EQUIVALENT transformation)

The relative ADP Problem has an empty P_abs. Hence, no infinite chain exists.

(27) YES