Termination of the following Term Rewriting System could be proven:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U21: {1}
s: {1}
plus: {1, 2}
and: {1}
isNat: empty set
0: empty set


CSR
  ↳ CSDependencyPairsProof

Context-sensitive rewrite system:
The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U21: {1}
s: {1}
plus: {1, 2}
and: {1}
isNat: empty set
0: empty set

Using Improved CS-DPs we result in the following initial Q-CSDP problem.

↳ CSR
  ↳ CSDependencyPairsProof
QCSDP
      ↳ QCSDependencyGraphProof

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, PLUS} are replacing on all positions.
For all symbols f in {U11, U21, and, U211, AND, U111} we have µ(f) = {1}.
The symbols in {isNat, ISNAT, U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

U211(tt, M, N) → PLUS(N, M)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
PLUS(N, 0) → U111(isNat(N), N)
PLUS(N, 0) → ISNAT(N)
PLUS(N, s(M)) → U211(and(isNat(M), isNat(N)), M, N)
PLUS(N, s(M)) → AND(isNat(M), isNat(N))
PLUS(N, s(M)) → ISNAT(M)

The collapsing dependency pairs are DPc:

U111(tt, N) → N
U211(tt, M, N) → N
U211(tt, M, N) → M
AND(tt, X) → X


The hidden terms of R are:

isNat(V2)

Every hiding context is built from:none

Hence, the new unhiding pairs DPu are :

U111(tt, N) → U(N)
U211(tt, M, N) → U(N)
U211(tt, M, N) → U(M)
AND(tt, X) → U(X)
U(isNat(V2)) → ISNAT(V2)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

The approximation of the Context-Sensitive Dependency Graph contains 2 SCCs with 7 less nodes.


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
QCSDP
            ↳ QCSDPReductionPairProof
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus} are replacing on all positions.
For all symbols f in {U11, U21, and, AND} we have µ(f) = {1}.
The symbols in {isNat, U, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

AND(tt, X) → U(X)
U(isNat(V2)) → ISNAT(V2)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

Using the order
Polynomial interpretation with max and min functions [25]:

POL(0) = 1   
POL(AND(x1, x2)) = x1 + x2   
POL(ISNAT(x1)) = x1   
POL(U(x1)) = x1   
POL(U11(x1, x2)) = x2   
POL(U21(x1, x2, x3)) = x2 + x3   
POL(and(x1, x2)) = x2   
POL(isNat(x1)) = x1   
POL(plus(x1, x2)) = x1 + x2   
POL(s(x1)) = x1   
POL(tt) = 1   

the following usable rules

isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)
U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X

could all be oriented weakly.
Furthermore, the pairs

AND(tt, X) → U(X)

could be oriented strictly and thus removed.
The pairs

U(isNat(V2)) → ISNAT(V2)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)

could only be oriented weakly and must be analyzed further.


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
            ↳ QCSDPReductionPairProof
QCSDP
                ↳ QCSDependencyGraphProof
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus} are replacing on all positions.
For all symbols f in {U11, U21, and, AND} we have µ(f) = {1}.
The symbols in {isNat, ISNAT, U} are not replacing on any position.

The TRS P consists of the following rules:

U(isNat(V2)) → ISNAT(V2)
ISNAT(plus(V1, V2)) → AND(isNat(V1), isNat(V2))
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

The approximation of the Context-Sensitive Dependency Graph contains 1 SCC with 2 less nodes.


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
            ↳ QCSDPReductionPairProof
              ↳ QCSDP
                ↳ QCSDependencyGraphProof
QCSDP
                    ↳ QCSDPSubtermProof
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus} are replacing on all positions.
For all symbols f in {U11, U21, and} we have µ(f) = {1}.
The symbols in {isNat, ISNAT} are not replacing on any position.

The TRS P consists of the following rules:

ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
ISNAT(x1)  =  x1

Subterm Order


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
            ↳ QCSDPReductionPairProof
              ↳ QCSDP
                ↳ QCSDependencyGraphProof
                  ↳ QCSDP
                    ↳ QCSDPSubtermProof
QCSDP
                        ↳ PIsEmptyProof
          ↳ QCSDP

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus} are replacing on all positions.
For all symbols f in {U11, U21, and} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

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

↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
QCSDP
            ↳ QCSDPSubtermProof

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, PLUS} are replacing on all positions.
For all symbols f in {U11, U21, and, U211} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

PLUS(N, s(M)) → U211(and(isNat(M), isNat(N)), M, N)
U211(tt, M, N) → PLUS(N, M)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


PLUS(N, s(M)) → U211(and(isNat(M), isNat(N)), M, N)
The remaining pairs can at least be oriented weakly.

U211(tt, M, N) → PLUS(N, M)
Used ordering: Combined order from the following AFS and order.
U211(x1, x2, x3)  =  x2
PLUS(x1, x2)  =  x2

Subterm Order


↳ CSR
  ↳ CSDependencyPairsProof
    ↳ QCSDP
      ↳ QCSDependencyGraphProof
        ↳ AND
          ↳ QCSDP
          ↳ QCSDP
            ↳ QCSDPSubtermProof
QCSDP
                ↳ QCSDependencyGraphProof

Q-restricted context-sensitive dependency pair problem:
The symbols in {s, plus, PLUS} are replacing on all positions.
For all symbols f in {U11, U21, and, U211} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

U211(tt, M, N) → PLUS(N, M)

The TRS R consists of the following rules:

U11(tt, N) → N
U21(tt, M, N) → s(plus(N, M))
and(tt, X) → X
isNat(0) → tt
isNat(plus(V1, V2)) → and(isNat(V1), isNat(V2))
isNat(s(V1)) → isNat(V1)
plus(N, 0) → U11(isNat(N), N)
plus(N, s(M)) → U21(and(isNat(M), isNat(N)), M, N)

Q is empty.

The approximation of the Context-Sensitive Dependency Graph contains 0 SCCs.