Termination w.r.t. Q of the following Term Rewriting System could be disproven:

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

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)



QTRS
  ↳ DependencyPairsProof

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

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)


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

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))
APP(app(app(until, p), f), x) → APP(f, x)
APP(app(app(until, p), f), x) → APP(p, x)
APP(app(app(until, p), f), x) → APP(app(if, app(p, x)), x)
APP(app(app(until, p), f), x) → APP(if, app(p, x))
APP(app(app(until, p), f), x) → APP(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)

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

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

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

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))
APP(app(app(until, p), f), x) → APP(f, x)
APP(app(app(until, p), f), x) → APP(p, x)
APP(app(app(until, p), f), x) → APP(app(if, app(p, x)), x)
APP(app(app(until, p), f), x) → APP(if, app(p, x))
APP(app(app(until, p), f), x) → APP(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)

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

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
QDP
          ↳ QDPOrderProof
          ↳ QDPOrderProof

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

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))
APP(app(app(until, p), f), x) → APP(f, x)
APP(app(app(until, p), f), x) → APP(p, x)

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)

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.


APP(app(app(until, p), f), x) → APP(f, x)
APP(app(app(until, p), f), x) → APP(p, x)
The remaining pairs can at least be oriented weakly.

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(APP(x1, x2)) = x1   
POL(app(x1, x2)) = 1 + x1 + x2   
POL(false) = 0   
POL(if) = 0   
POL(true) = 0   
POL(until) = 0   

The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
QDP
              ↳ MNOCProof
          ↳ QDPOrderProof

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

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)

We have to consider all minimal (P,Q,R)-chains.
We use the modular non-overlap check [17] to decrease Q to the empty set.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ MNOCProof
QDP
                  ↳ NonTerminationProof
          ↳ QDPOrderProof

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

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))


s = APP(app(app(until, p), f), x) evaluates to t =APP(app(app(until, p), f), app(f, x))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP(app(app(until, p), f), x) to APP(app(app(until, p), f), app(f, x)).




We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


APP(app(app(until, p), f), x) → APP(f, x)
APP(app(app(until, p), f), x) → APP(p, x)
The remaining pairs can at least be oriented weakly.

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
M( until ) =
/1\
\0/

M( if ) =
/0\
\0/

M( true ) =
/0\
\0/

M( false ) =
/0\
\0/

M( app(x1, x2) ) =
/0\
\1/
+
/00\
\10/
·x1+
/01\
\01/
·x2

Tuple symbols:
M( APP(x1, x2) ) = 0+
[0,1]
·x1+
[0,0]
·x2


Matrix type:
We used a basic matrix type which is not further parametrizeable.


As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ QDP
          ↳ QDPOrderProof
          ↳ QDPOrderProof
QDP

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

APP(app(app(until, p), f), x) → APP(app(app(until, p), f), app(f, x))

The TRS R consists of the following rules:

app(app(app(if, true), x), y) → x
app(app(app(if, false), x), y) → y
app(app(app(until, p), f), x) → app(app(app(if, app(p, x)), x), app(app(app(until, p), f), app(f, x)))

The set Q consists of the following terms:

app(app(app(until, x0), x1), x2)
app(app(app(if, false), x0), x1)
app(app(app(if, true), x0), x1)

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