YES Termination proof of ../tpdb/TRS/CSR/Ex49_GM04.trs
Termination of the following Term Rewriting System could be proven:

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

minus(0, Y) → 0
minus(s(X), s(Y)) → minus(X, Y)
geq(X, 0) → true
geq(0, s(Y)) → false
geq(s(X), s(Y)) → geq(X, Y)
div(0, s(Y)) → 0
div(s(X), s(Y)) → if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) → X
if(false, X, Y) → Y

The replacement map contains the following entries:

minus: empty set
0: empty set
s: {1}
geq: empty set
true: empty set
false: empty set
div: {1}
if: {1}


CSR
  ↳ Zantema-Transformation

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

minus(0, Y) → 0
minus(s(X), s(Y)) → minus(X, Y)
geq(X, 0) → true
geq(0, s(Y)) → false
geq(s(X), s(Y)) → geq(X, Y)
div(0, s(Y)) → 0
div(s(X), s(Y)) → if(geq(X, Y), s(div(minus(X, Y), s(Y))), 0)
if(true, X, Y) → X
if(false, X, Y) → Y

The replacement map contains the following entries:

minus: empty set
0: empty set
s: {1}
geq: empty set
true: empty set
false: empty set
div: {1}
if: {1}

We applied the Zantema [34] to transform the context-sensitive TRS to an usual TRS.

↳ CSR
  ↳ Zantema-Transformation
QTRS
      ↳ DependencyPairsProof

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

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

A(0Inact) → 01
MINUS(sInact(X), sInact(Y)) → A(Y)
DIV(s(X), sInact(Y)) → MINUS(X, a(Y))
MINUS(sInact(X), sInact(Y)) → MINUS(a(X), a(Y))
A(sInact(x1)) → S(x1)
IF(true, X, Y) → A(X)
MINUS(sInact(X), sInact(Y)) → A(X)
MINUS(0Inact, Y) → 01
IF(false, X, Y) → A(Y)
DIV(s(X), sInact(Y)) → IF(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
DIV(s(X), sInact(Y)) → DIV(minus(X, a(Y)), sInact(a(Y)))
DIV(s(X), sInact(Y)) → GEQ(X, a(Y))
GEQ(sInact(X), sInact(Y)) → GEQ(a(X), a(Y))
DIV(s(X), sInact(Y)) → A(Y)
GEQ(sInact(X), sInact(Y)) → A(X)
GEQ(sInact(X), sInact(Y)) → A(Y)

The TRS R consists of the following rules:

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

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

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

A(0Inact) → 01
MINUS(sInact(X), sInact(Y)) → A(Y)
DIV(s(X), sInact(Y)) → MINUS(X, a(Y))
MINUS(sInact(X), sInact(Y)) → MINUS(a(X), a(Y))
A(sInact(x1)) → S(x1)
IF(true, X, Y) → A(X)
MINUS(sInact(X), sInact(Y)) → A(X)
MINUS(0Inact, Y) → 01
IF(false, X, Y) → A(Y)
DIV(s(X), sInact(Y)) → IF(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
DIV(s(X), sInact(Y)) → DIV(minus(X, a(Y)), sInact(a(Y)))
DIV(s(X), sInact(Y)) → GEQ(X, a(Y))
GEQ(sInact(X), sInact(Y)) → GEQ(a(X), a(Y))
DIV(s(X), sInact(Y)) → A(Y)
GEQ(sInact(X), sInact(Y)) → A(X)
GEQ(sInact(X), sInact(Y)) → A(Y)

The TRS R consists of the following rules:

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 3 SCCs with 13 less nodes.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GEQ(sInact(X), sInact(Y)) → GEQ(a(X), a(Y))

The TRS R consists of the following rules:

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ MNOCProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GEQ(sInact(X), sInact(Y)) → GEQ(a(X), a(Y))

The TRS R consists of the following rules:

a(x) → x
a(sInact(x1)) → s(x1)
a(0Inact) → 0
00Inact
s(x1) → sInact(x1)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the modular non-overlap check [15] to enlarge Q to all left-hand sides of R.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ MNOCProof
QDP
                        ↳ RuleRemovalProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

GEQ(sInact(X), sInact(Y)) → GEQ(a(X), a(Y))

The TRS R consists of the following rules:

a(x) → x
a(sInact(x1)) → s(x1)
a(0Inact) → 0
00Inact
s(x1) → sInact(x1)

The set Q consists of the following terms:

a(x0)
0
s(x0)

We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

GEQ(sInact(X), sInact(Y)) → GEQ(a(X), a(Y))

Strictly oriented rules of the TRS R:

a(x) → x
a(sInact(x1)) → s(x1)
a(0Inact) → 0
00Inact

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 2   
POL(0Inact) = 1   
POL(GEQ(x1, x2)) = 2·x1 + x2   
POL(a(x1)) = 1 + 2·x1   
POL(s(x1)) = 2 + 2·x1   
POL(sInact(x1)) = 2 + 2·x1   



↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ MNOCProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP
              ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

s(x1) → sInact(x1)

The set Q consists of the following terms:

a(x0)
0
s(x0)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(sInact(X), sInact(Y)) → MINUS(a(X), a(Y))

The TRS R consists of the following rules:

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ MNOCProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(sInact(X), sInact(Y)) → MINUS(a(X), a(Y))

The TRS R consists of the following rules:

a(x) → x
a(sInact(x1)) → s(x1)
a(0Inact) → 0
00Inact
s(x1) → sInact(x1)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the modular non-overlap check [15] to enlarge Q to all left-hand sides of R.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ MNOCProof
QDP
                        ↳ RuleRemovalProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

MINUS(sInact(X), sInact(Y)) → MINUS(a(X), a(Y))

The TRS R consists of the following rules:

a(x) → x
a(sInact(x1)) → s(x1)
a(0Inact) → 0
00Inact
s(x1) → sInact(x1)

The set Q consists of the following terms:

a(x0)
0
s(x0)

We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

MINUS(sInact(X), sInact(Y)) → MINUS(a(X), a(Y))

Strictly oriented rules of the TRS R:

a(x) → x
a(sInact(x1)) → s(x1)
a(0Inact) → 0
00Inact

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 2   
POL(0Inact) = 1   
POL(MINUS(x1, x2)) = 2·x1 + x2   
POL(a(x1)) = 1 + 2·x1   
POL(s(x1)) = 2 + 2·x1   
POL(sInact(x1)) = 2 + 2·x1   



↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ MNOCProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ PisEmptyProof
              ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

s(x1) → sInact(x1)

The set Q consists of the following terms:

a(x0)
0
s(x0)

We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

DIV(s(X), sInact(Y)) → DIV(minus(X, a(Y)), sInact(a(Y)))

The TRS R consists of the following rules:

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


DIV(s(X), sInact(Y)) → DIV(minus(X, a(Y)), sInact(a(Y)))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(0Inact) = 0   
POL(DIV(x1, x2)) = x1   
POL(a(x1)) = 0   
POL(minus(x1, x2)) = 0   
POL(s(x1)) = 1 + x1   
POL(sInact(x1)) = 0   

The following usable rules [17] were oriented:

minus(0Inact, Y) → 0
00Inact
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))



↳ CSR
  ↳ Zantema-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

minus(0Inact, Y) → 0
minus(sInact(X), sInact(Y)) → minus(a(X), a(Y))
geq(X, 0Inact) → true
geq(0Inact, sInact(Y)) → false
geq(sInact(X), sInact(Y)) → geq(a(X), a(Y))
div(0, sInact(Y)) → 0
div(s(X), sInact(Y)) → if(geq(X, a(Y)), sInact(div(minus(X, a(Y)), sInact(a(Y)))), 0Inact)
if(true, X, Y) → a(X)
if(false, X, Y) → a(Y)
a(x) → x
s(x1) → sInact(x1)
a(sInact(x1)) → s(x1)
00Inact
a(0Inact) → 0

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.