(0) Obligation:

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

a__U11(tt, N) → mark(N)
a__U21(tt, M, N) → s(a__plus(mark(N), mark(M)))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(plus(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__isNat(s(V1)) → a__isNat(V1)
a__plus(N, 0) → a__U11(a__isNat(N), N)
a__plus(N, s(M)) → a__U21(a__and(a__isNat(M), isNat(N)), M, N)
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U21(X1, X2, X3)) → a__U21(mark(X1), X2, X3)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(0) → 0
a__U11(X1, X2) → U11(X1, X2)
a__U21(X1, X2, X3) → U21(X1, X2, X3)
a__plus(X1, X2) → plus(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)

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__U11(tt, N) → MARK(N)
A__U21(tt, M, N) → A__PLUS(mark(N), mark(M))
A__U21(tt, M, N) → MARK(N)
A__U21(tt, M, N) → MARK(M)
A__AND(tt, X) → MARK(X)
A__ISNAT(plus(V1, V2)) → A__AND(a__isNat(V1), isNat(V2))
A__ISNAT(plus(V1, V2)) → A__ISNAT(V1)
A__ISNAT(s(V1)) → A__ISNAT(V1)
A__PLUS(N, 0) → A__U11(a__isNat(N), N)
A__PLUS(N, 0) → A__ISNAT(N)
A__PLUS(N, s(M)) → A__U21(a__and(a__isNat(M), isNat(N)), M, N)
A__PLUS(N, s(M)) → A__AND(a__isNat(M), isNat(N))
A__PLUS(N, s(M)) → A__ISNAT(M)
MARK(U11(X1, X2)) → A__U11(mark(X1), X2)
MARK(U11(X1, X2)) → MARK(X1)
MARK(U21(X1, X2, X3)) → A__U21(mark(X1), X2, X3)
MARK(U21(X1, X2, X3)) → 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(and(X1, X2)) → A__AND(mark(X1), X2)
MARK(and(X1, X2)) → MARK(X1)
MARK(isNat(X)) → A__ISNAT(X)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__U11(tt, N) → mark(N)
a__U21(tt, M, N) → s(a__plus(mark(N), mark(M)))
a__and(tt, X) → mark(X)
a__isNat(0) → tt
a__isNat(plus(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__isNat(s(V1)) → a__isNat(V1)
a__plus(N, 0) → a__U11(a__isNat(N), N)
a__plus(N, s(M)) → a__U21(a__and(a__isNat(M), isNat(N)), M, N)
mark(U11(X1, X2)) → a__U11(mark(X1), X2)
mark(U21(X1, X2, X3)) → a__U21(mark(X1), X2, X3)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
mark(and(X1, X2)) → a__and(mark(X1), X2)
mark(isNat(X)) → a__isNat(X)
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(0) → 0
a__U11(X1, X2) → U11(X1, X2)
a__U21(X1, X2, X3) → U21(X1, X2, X3)
a__plus(X1, X2) → plus(X1, X2)
a__and(X1, X2) → and(X1, X2)
a__isNat(X) → isNat(X)

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

(3) QDPSizeChangeProof (EQUIVALENT transformation)

We used the following order and afs together with the size-change analysis [AAECC05] to show that there are no infinite chains for this DP problem.

Order:Combined order from the following AFS and order.
mark(x1)  =  x1
U11(x1, x2)  =  U11(x1, x2)
a__U11(x1, x2)  =  a__U11(x1, x2)
tt  =  tt
plus(x1, x2)  =  plus(x1, x2)
a__plus(x1, x2)  =  a__plus(x1, x2)
0  =  0
a__isNat(x1)  =  x1
and(x1, x2)  =  and(x1, x2)
a__and(x1, x2)  =  a__and(x1, x2)
isNat(x1)  =  x1
s(x1)  =  s(x1)
U21(x1, x2, x3)  =  U21(x1, x2, x3)
a__U21(x1, x2, x3)  =  a__U21(x1, x2, x3)

Lexicographic path order with status [LPO].
Quasi-Precedence:

[tt, 0] > [U112, aU112] > s1
[plus2, aplus2, U213, aU213] > [U112, aU112] > s1
[plus2, aplus2, U213, aU213] > [and2, aand2] > s1

Status:
U112: [1,2]
aU112: [1,2]
tt: []
plus2: [1,2]
aplus2: [1,2]
0: []
and2: [1,2]
aand2: [1,2]
s1: [1]
U213: [3,2,1]
aU213: [3,2,1]

AFS:
mark(x1)  =  x1
U11(x1, x2)  =  U11(x1, x2)
a__U11(x1, x2)  =  a__U11(x1, x2)
tt  =  tt
plus(x1, x2)  =  plus(x1, x2)
a__plus(x1, x2)  =  a__plus(x1, x2)
0  =  0
a__isNat(x1)  =  x1
and(x1, x2)  =  and(x1, x2)
a__and(x1, x2)  =  a__and(x1, x2)
isNat(x1)  =  x1
s(x1)  =  s(x1)
U21(x1, x2, x3)  =  U21(x1, x2, x3)
a__U21(x1, x2, x3)  =  a__U21(x1, x2, x3)

From the DPs we obtained the following set of size-change graphs:

  • MARK(U11(X1, X2)) → A__U11(mark(X1), X2) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 > 2

  • A__PLUS(N, 0) → A__U11(a__isNat(N), N) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 >= 2

  • MARK(U21(X1, X2, X3)) → A__U21(mark(X1), X2, X3) (allowed arguments on rhs = {2, 3})
    The graph contains the following edges 1 > 2, 1 > 3

  • A__PLUS(N, s(M)) → A__U21(a__and(a__isNat(M), isNat(N)), M, N) (allowed arguments on rhs = {2, 3})
    The graph contains the following edges 2 > 2, 1 >= 3

  • MARK(and(X1, X2)) → A__AND(mark(X1), X2) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 > 2

  • A__PLUS(N, s(M)) → A__AND(a__isNat(M), isNat(N)) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 >= 2

  • A__ISNAT(plus(V1, V2)) → A__AND(a__isNat(V1), isNat(V2)) (allowed arguments on rhs = {2})
    The graph contains the following edges 1 > 2

  • MARK(isNat(X)) → A__ISNAT(X) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 >= 1

  • A__AND(tt, X) → MARK(X) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 >= 1

  • 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__U11(tt, N) → MARK(N) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 >= 1

  • A__U21(tt, M, N) → A__PLUS(mark(N), mark(M)) (allowed arguments on rhs = {1, 2})
    The graph contains the following edges 3 >= 1, 2 >= 2

  • MARK(U11(X1, X2)) → MARK(X1) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • MARK(U21(X1, X2, X3)) → 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(and(X1, X2)) → MARK(X1) (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) → A__ISNAT(N) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 >= 1

  • A__PLUS(N, s(M)) → A__ISNAT(M) (allowed arguments on rhs = {1})
    The graph contains the following edges 2 > 1

  • A__ISNAT(plus(V1, V2)) → A__ISNAT(V1) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • A__ISNAT(s(V1)) → A__ISNAT(V1) (allowed arguments on rhs = {1})
    The graph contains the following edges 1 > 1

  • A__U21(tt, M, N) → MARK(N) (allowed arguments on rhs = {1})
    The graph contains the following edges 3 >= 1

  • A__U21(tt, M, N) → 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(U11(X1, X2)) → a__U11(mark(X1), X2)
a__U11(tt, N) → mark(N)
mark(plus(X1, X2)) → a__plus(mark(X1), mark(X2))
a__plus(N, 0) → a__U11(a__isNat(N), N)
mark(and(X1, X2)) → a__and(mark(X1), X2)
a__and(tt, X) → mark(X)
mark(isNat(X)) → a__isNat(X)
a__isNat(plus(V1, V2)) → a__and(a__isNat(V1), isNat(V2))
a__isNat(s(V1)) → a__isNat(V1)
mark(U21(X1, X2, X3)) → a__U21(mark(X1), X2, X3)
mark(tt) → tt
mark(s(X)) → s(mark(X))
mark(0) → 0
a__plus(N, s(M)) → a__U21(a__and(a__isNat(M), isNat(N)), M, N)
a__U21(tt, M, N) → s(a__plus(mark(N), mark(M)))
a__U11(X1, X2) → U11(X1, X2)
a__plus(X1, X2) → plus(X1, X2)
a__isNat(0) → tt
a__isNat(X) → isNat(X)
a__and(X1, X2) → and(X1, X2)
a__U21(X1, X2, X3) → U21(X1, X2, X3)

(4) TRUE