(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
a__and(tt, X) → mark(X)
a__plus(N, 0) → mark(N)
a__plus(N, s(M)) → s(a__plus(mark(N), mark(M)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(tt) → tt
mark(0) → 0
mark(s(X)) → s(mark(X))
a__and(X1, X2) → and(X1, X2)
a__plus(X1, X2) → plus(X1, X2)
Q is empty.
(1) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(2) Obligation:
Q DP problem:
The TRS P consists of the following rules:
A__AND(tt, X) → MARK(X)
A__PLUS(N, 0) → MARK(N)
A__PLUS(N, s(M)) → A__PLUS(mark(N), mark(M))
A__PLUS(N, s(M)) → MARK(N)
A__PLUS(N, s(M)) → MARK(M)
MARK(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(plus(X1, X2)) → A__PLUS(mark(X1), mark(X2))
MARK(plus(X1, X2)) → MARK(X1)
MARK(plus(X1, X2)) → MARK(X2)
MARK(s(X)) → MARK(X)
The TRS R consists of the following rules:
a__and(tt, X) → mark(X)
a__plus(N, 0) → mark(N)
a__plus(N, s(M)) → s(a__plus(mark(N), mark(M)))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(tt) → tt
mark(0) → 0
mark(s(X)) → s(mark(X))
a__and(X1, X2) → and(X1, X2)
a__plus(X1, X2) → plus(X1, X2)
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(3) QDPSizeChangeProof (EQUIVALENT transformation)
We used the following order together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.
Order:Polynomial interpretation [POLO]:
POL(0) = 1
POL(a__and(x1, x2)) = 1 + x1 + x2
POL(a__plus(x1, x2)) = 1 + x1 + x2
POL(and(x1, x2)) = 1 + x1 + x2
POL(mark(x1)) = x1
POL(plus(x1, x2)) = 1 + x1 + x2
POL(s(x1)) = 1 + x1
POL(tt) = 1
From the DPs we obtained the following set of size-change graphs:
- MARK(and(X1, X2)) → A__AND(mark(X1), X2) (allowed arguments on rhs = {2})
The graph contains the following edges 1 > 2
- MARK(plus(X1, X2)) → A__PLUS(mark(X1), mark(X2)) (allowed arguments on rhs = {1, 2})
The graph contains the following edges 1 > 1, 1 > 2
- A__PLUS(N, s(M)) → A__PLUS(mark(N), mark(M)) (allowed arguments on rhs = {1, 2})
The graph contains the following edges 1 >= 1, 2 > 2
- A__AND(tt, X) → MARK(X) (allowed arguments on rhs = {1})
The graph contains the following edges 2 >= 1
- MARK(and(X1, X2)) → MARK(X1) (allowed arguments on rhs = {1})
The graph contains the following edges 1 > 1
- MARK(plus(X1, X2)) → MARK(X1) (allowed arguments on rhs = {1})
The graph contains the following edges 1 > 1
- MARK(plus(X1, X2)) → MARK(X2) (allowed arguments on rhs = {1})
The graph contains the following edges 1 > 1
- MARK(s(X)) → MARK(X) (allowed arguments on rhs = {1})
The graph contains the following edges 1 > 1
- A__PLUS(N, 0) → MARK(N) (allowed arguments on rhs = {1})
The graph contains the following edges 1 >= 1
- A__PLUS(N, s(M)) → MARK(N) (allowed arguments on rhs = {1})
The graph contains the following edges 1 >= 1
- A__PLUS(N, s(M)) → MARK(M) (allowed arguments on rhs = {1})
The graph contains the following edges 2 > 1
We oriented the following set of usable rules [AAECC05,FROCOS05].
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(0) → 0
a__plus(X1, X2) → plus(X1, X2)
a__plus(N, s(M)) → s(a__plus(mark(N), mark(M)))
a__plus(N, 0) → mark(N)
a__and(X1, X2) → and(X1, X2)
a__and(tt, X) → mark(X)
(4) TRUE