YES
0 RelTRS
↳1 RelTRStoRelADPProof (⇔, 0 ms)
↳2 RelADPP
↳3 RelADPDepGraphProof (⇔, 0 ms)
↳4 AND
↳5 RelADPP
↳6 RelADPCleverAfsProof (⇒, 53 ms)
↳7 QDP
↳8 MRRProof (⇔, 0 ms)
↳9 QDP
↳10 MRRProof (⇔, 0 ms)
↳11 QDP
↳12 PisEmptyProof (⇔, 0 ms)
↳13 YES
↳14 RelADPP
↳15 RelADPCleverAfsProof (⇒, 48 ms)
↳16 QDP
↳17 MRRProof (⇔, 0 ms)
↳18 QDP
↳19 DependencyGraphProof (⇔, 0 ms)
↳20 TRUE
↳21 RelADPP
↳22 RelADPReductionPairProof (⇔, 56 ms)
↳23 RelADPP
↳24 DAbsisEmptyProof (⇔, 0 ms)
↳25 YES
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
rm(n, nil) → nil
rm(n, cons(m, x)) → ifrm(eq(n, m), n, cons(m, x))
ifrm(true, n, cons(m, x)) → rm(n, x)
ifrm(false, n, cons(m, x)) → cons(m, rm(n, x))
purge(nil) → nil
purge(cons(n, x)) → cons(n, purge(rm(n, x)))
purge(cons(n, cons(m, x))) → purge(cons(m, cons(n, x)))
We upgrade the RelTRS problem to an equivalent Relative ADP Problem [IJCAR24].
eq(0, 0) → true
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → EQ(x, y)
rm(n, nil) → nil
rm(n, cons(m, x)) → IFRM(eq(n, m), n, cons(m, x))
rm(n, cons(m, x)) → ifrm(EQ(n, m), n, cons(m, x))
ifrm(true, n, cons(m, x)) → RM(n, x)
ifrm(false, n, cons(m, x)) → cons(m, RM(n, x))
purge(nil) → nil
purge(cons(n, x)) → cons(n, PURGE(rm(n, x)))
purge(cons(n, x)) → cons(n, purge(RM(n, x)))
purge(cons(n, cons(m, x))) → PURGE(cons(m, cons(n, x)))
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.
eq(s(x), s(y)) → EQ(x, y)
ifrm(true, n, cons(m, x)) → rm(n, x)
ifrm(false, n, cons(m, x)) → cons(m, rm(n, x))
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(0, 0) → true
purge(cons(n, x)) → cons(n, purge(rm(n, x)))
rm(n, nil) → nil
rm(n, cons(m, x)) → ifrm(eq(n, m), n, cons(m, x))
purge(nil) → nil
purge(cons(n, cons(m, x))) → purge(cons(m, cons(n, x)))
Furthermore, We use an argument filter [LPAR04].
Filtering:s_1 =
true =
eq_2 = 0, 1
ifrm_3 = 0, 1
0 =
purge_1 = 0
cons_2 = 0
rm_2 = 0
EQ_2 =
false =
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.
EQ(x1, x2) = EQ(x1, x2)
s(x1) = s(x1)
purge(x1) = purge
cons(x1, x2) = x2
rm(x1, x2) = x2
ifrm(x1, x2, x3) = x3
eq(x1, x2) = eq
true = true
false = false
0 = 0
nil = nil
Recursive path order with status [RPO].
Quasi-Precedence:
purge > nil
eq > [s1, false]
eq > [true, 0]
EQ2: multiset
s1: multiset
purge: []
eq: []
true: multiset
false: multiset
0: multiset
nil: multiset
EQ0(s0(x), s0(y)) → EQ0(x, y)
ifrm(cons(x)) → rm(x)
ifrm(cons(x)) → cons(rm(x))
eq → false0
eq → eq
eq → true0
purge → cons(purge)
rm(nil0) → nil0
rm(cons(x)) → ifrm(cons(x))
purge → nil0
purge → purge
eq → false0
eq → true0
POL(EQ0(x1, x2)) = x1 + 2·x2
POL(cons(x1)) = x1
POL(eq) = 2
POL(false0) = 1
POL(ifrm(x1)) = 2·x1
POL(nil0) = 0
POL(purge) = 0
POL(rm(x1)) = 2·x1
POL(s0(x1)) = x1
POL(true0) = 0
EQ0(s0(x), s0(y)) → EQ0(x, y)
ifrm(cons(x)) → rm(x)
ifrm(cons(x)) → cons(rm(x))
eq → eq
purge → cons(purge)
rm(nil0) → nil0
rm(cons(x)) → ifrm(cons(x))
purge → nil0
purge → purge
EQ0(s0(x), s0(y)) → EQ0(x, y)
rm(nil0) → nil0
purge → nil0
POL(EQ0(x1, x2)) = x1 + x2
POL(cons(x1)) = x1
POL(eq) = 0
POL(ifrm(x1)) = 2 + 2·x1
POL(nil0) = 1
POL(purge) = 2
POL(rm(x1)) = 2 + 2·x1
POL(s0(x1)) = 1 + x1
ifrm(cons(x)) → rm(x)
ifrm(cons(x)) → cons(rm(x))
eq → eq
purge → cons(purge)
rm(cons(x)) → ifrm(cons(x))
purge → purge
ifrm(false, n, cons(m, x)) → cons(m, RM(n, x))
ifrm(true, n, cons(m, x)) → RM(n, x)
rm(n, cons(m, x)) → IFRM(eq(n, m), n, cons(m, x))
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
eq(0, 0) → true
purge(cons(n, x)) → cons(n, purge(rm(n, x)))
rm(n, nil) → nil
rm(n, cons(m, x)) → ifrm(eq(n, m), n, cons(m, x))
purge(nil) → nil
purge(cons(n, cons(m, x))) → purge(cons(m, cons(n, x)))
Furthermore, We use an argument filter [LPAR04].
Filtering:s_1 =
true =
eq_2 = 0, 1
RM_2 = 0
ifrm_3 = 0, 1
0 =
purge_1 =
cons_2 = 0
rm_2 = 0
IFRM_3 = 1
false =
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.
RM(x1, x2) = RM(x2)
cons(x1, x2) = cons(x2)
IFRM(x1, x2, x3) = IFRM(x1, x3)
eq(x1, x2) = eq
false = false
true = true
0 = 0
s(x1) = x1
purge(x1) = purge(x1)
rm(x1, x2) = x2
ifrm(x1, x2, x3) = x3
nil = nil
Recursive path order with status [RPO].
Quasi-Precedence:
0 > false
0 > true
purge1 > cons1 > [RM1, IFRM2] > eq > false
purge1 > cons1 > [RM1, IFRM2] > eq > true
purge1 > nil
RM1: [1]
cons1: [1]
IFRM2: [1,2]
eq: multiset
false: multiset
true: multiset
0: multiset
purge1: multiset
nil: multiset
RM(cons(x)) → IFRM(eq, cons(x))
IFRM(false0, cons(x)) → RM(x)
IFRM(true0, cons(x)) → RM(x)
ifrm(cons(x)) → rm(x)
ifrm(cons(x)) → cons(rm(x))
eq → false0
eq → eq
eq → true0
purge0(cons(x)) → cons(purge0(rm(x)))
rm(nil0) → nil0
rm(cons(x)) → ifrm(cons(x))
purge0(nil0) → nil0
purge0(cons(cons(x))) → purge0(cons(cons(x)))
IFRM(false0, cons(x)) → RM(x)
IFRM(true0, cons(x)) → RM(x)
ifrm(cons(x)) → rm(x)
purge0(cons(x)) → cons(purge0(rm(x)))
POL(IFRM(x1, x2)) = 1 + 2·x1 + x2
POL(RM(x1)) = 1 + x1
POL(cons(x1)) = 2 + x1
POL(eq) = 0
POL(false0) = 0
POL(ifrm(x1)) = x1
POL(nil0) = 0
POL(purge0(x1)) = 2·x1
POL(rm(x1)) = x1
POL(true0) = 0
RM(cons(x)) → IFRM(eq, cons(x))
ifrm(cons(x)) → cons(rm(x))
eq → false0
eq → eq
eq → true0
rm(nil0) → nil0
rm(cons(x)) → ifrm(cons(x))
purge0(nil0) → nil0
purge0(cons(cons(x))) → purge0(cons(cons(x)))
purge(cons(n, x)) → cons(n, PURGE(rm(n, x)))
ifrm(true, n, cons(m, x)) → rm(n, x)
ifrm(false, n, cons(m, x)) → cons(m, rm(n, x))
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
eq(0, 0) → true
purge(cons(n, x)) → cons(n, purge(rm(n, x)))
rm(n, nil) → nil
rm(n, cons(m, x)) → ifrm(eq(n, m), n, cons(m, x))
purge(nil) → nil
purge(cons(n, cons(m, x))) → PURGE(cons(m, cons(n, x)))
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:
purge(cons(n, x)) → cons(n, PURGE(rm(n, x)))
ifrm(true, n, cons(m, x)) → rm(n, x)
ifrm(false, n, cons(m, x)) → cons(m, rm(n, x))
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
eq(0, 0) → true
purge(cons(n, x)) → cons(n, purge(rm(n, x)))
rm(n, nil) → nil
rm(n, cons(m, x)) → ifrm(eq(n, m), n, cons(m, x))
purge(nil) → nil
POL(0) = 3
POL(EQ(x1, x2)) = 2 + 2·x1·x2
POL(IFRM(x1, x2, x3)) = 2
POL(PURGE(x1)) = 2 + 2·x1
POL(RM(x1, x2)) = 2·x1 + 2·x1·x2 + x2
POL(cons(x1, x2)) = 1 + x2
POL(eq(x1, x2)) = 0
POL(false) = 0
POL(ifrm(x1, x2, x3)) = x1 + x3
POL(nil) = 0
POL(purge(x1)) = 1 + 2·x1
POL(rm(x1, x2)) = x2
POL(s(x1)) = 3 + 3·x1
POL(true) = 0
ifrm(true, n, cons(m, x)) → rm(n, x)
ifrm(false, n, cons(m, x)) → cons(m, rm(n, x))
eq(0, s(x)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
purge(cons(n, x)) → cons(n, purge(rm(n, x)))
eq(0, 0) → true
rm(n, nil) → nil
rm(n, cons(m, x)) → ifrm(eq(n, m), n, cons(m, x))
purge(nil) → nil
purge(cons(n, cons(m, x))) → PURGE(cons(m, cons(n, x)))