Termination of the following Term Rewriting System could be proven:

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

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), M, N)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U12: {1}
isNat: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
s: {1}
plus: {1, 2}
0: empty set


CSR
  ↳ CSDependencyPairsProof

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

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), M, N)

The replacement map contains the following entries:

U11: {1}
tt: empty set
U12: {1}
isNat: empty set
U21: {1}
U31: {1}
U41: {1}
U42: {1}
s: {1}
plus: {1, 2}
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 {U12, U21, s, plus, U121, PLUS, U211} are replacing on all positions.
For all symbols f in {U11, U31, U41, U42, U111, U421, U411, U311} we have µ(f) = {1}.
The symbols in {isNat, ISNAT, U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

U111(tt, V2) → U121(isNat(V2))
U111(tt, V2) → ISNAT(V2)
U411(tt, M, N) → U421(isNat(N), M, N)
U411(tt, M, N) → ISNAT(N)
U421(tt, M, N) → PLUS(N, M)
ISNAT(plus(V1, V2)) → U111(isNat(V1), V2)
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → U211(isNat(V1))
ISNAT(s(V1)) → ISNAT(V1)
PLUS(N, 0) → U311(isNat(N), N)
PLUS(N, 0) → ISNAT(N)
PLUS(N, s(M)) → U411(isNat(M), M, N)
PLUS(N, s(M)) → ISNAT(M)

The collapsing dependency pairs are DPc:

U311(tt, N) → N
U421(tt, M, N) → N
U421(tt, M, N) → M


The hidden terms of R are:
none

Every hiding context is built from:none

Hence, the new unhiding pairs DPu are :

U311(tt, N) → U(N)
U421(tt, M, N) → U(N)
U421(tt, M, N) → U(M)

The TRS R consists of the following rules:

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), M, N)

Q is empty.

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


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

Q-restricted context-sensitive dependency pair problem:
The symbols in {U12, U21, s, plus} are replacing on all positions.
For all symbols f in {U11, U31, U41, U42, U111} 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)) → U111(isNat(V1), V2)
U111(tt, V2) → ISNAT(V2)
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)

The TRS R consists of the following rules:

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), 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)) → U111(isNat(V1), V2)
ISNAT(plus(V1, V2)) → ISNAT(V1)
ISNAT(s(V1)) → ISNAT(V1)
The remaining pairs can at least be oriented weakly.

U111(tt, V2) → ISNAT(V2)
Used ordering: Combined order from the following AFS and order.
U111(x1, x2)  =  x2
ISNAT(x1)  =  x1

Subterm Order


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

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

The TRS P consists of the following rules:

U111(tt, V2) → ISNAT(V2)

The TRS R consists of the following rules:

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), M, N)

Q is empty.

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


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

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

The TRS P consists of the following rules:

U411(tt, M, N) → U421(isNat(N), M, N)
U421(tt, M, N) → PLUS(N, M)
PLUS(N, s(M)) → U411(isNat(M), M, N)

The TRS R consists of the following rules:

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), 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)) → U411(isNat(M), M, N)
The remaining pairs can at least be oriented weakly.

U411(tt, M, N) → U421(isNat(N), M, N)
U421(tt, M, N) → PLUS(N, M)
Used ordering: Combined order from the following AFS and order.
U421(x1, x2, x3)  =  x2
U411(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 {U12, U21, s, plus, PLUS} are replacing on all positions.
For all symbols f in {U11, U31, U41, U42, U421, U411} we have µ(f) = {1}.
The symbols in {isNat} are not replacing on any position.

The TRS P consists of the following rules:

U411(tt, M, N) → U421(isNat(N), M, N)
U421(tt, M, N) → PLUS(N, M)

The TRS R consists of the following rules:

U11(tt, V2) → U12(isNat(V2))
U12(tt) → tt
U21(tt) → tt
U31(tt, N) → N
U41(tt, M, N) → U42(isNat(N), M, N)
U42(tt, M, N) → s(plus(N, M))
isNat(0) → tt
isNat(plus(V1, V2)) → U11(isNat(V1), V2)
isNat(s(V1)) → U21(isNat(V1))
plus(N, 0) → U31(isNat(N), N)
plus(N, s(M)) → U41(isNat(M), M, N)

Q is empty.

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