(0) Obligation:

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

app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))

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:

APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
APP(app(f, 0), n) → APP(hd, app(app(map, f), app(app(cons, 0), nil)))
APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(f, 0), n) → APP(map, f)
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(f, 0), n) → APP(cons, 0)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)

The TRS R consists of the following rules:

app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))

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

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 4 less nodes.

(4) Obligation:

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

APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)

The TRS R consists of the following rules:

app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))

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

(5) Narrowing (EQUIVALENT transformation)

By narrowing [LPAR04] the rule APP(app(f, 0), n) → APP(app(hd, app(app(map, f), app(app(cons, 0), nil))), n) at position [0,1] we obtained the following new rules [LPAR04]:

APP(app(0, 0), y1) → APP(app(hd, app(app(hd, app(app(map, map), app(app(cons, 0), nil))), app(app(cons, 0), nil))), y1)
APP(app(x0, 0), y1) → APP(app(hd, app(app(cons, app(x0, 0)), app(app(map, x0), nil))), y1)
APP(app(y0, 0), y1) → APP(app(hd, app(app(map, y0), app(app(hd, app(app(map, cons), app(app(cons, 0), nil))), nil))), y1)

(6) Obligation:

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

APP(app(f, 0), n) → APP(app(map, f), app(app(cons, 0), nil))
APP(app(f, 0), n) → APP(app(cons, 0), nil)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
APP(app(0, 0), y1) → APP(app(hd, app(app(hd, app(app(map, map), app(app(cons, 0), nil))), app(app(cons, 0), nil))), y1)
APP(app(x0, 0), y1) → APP(app(hd, app(app(cons, app(x0, 0)), app(app(map, x0), nil))), y1)
APP(app(y0, 0), y1) → APP(app(hd, app(app(map, y0), app(app(hd, app(app(map, cons), app(app(cons, 0), nil))), nil))), y1)

The TRS R consists of the following rules:

app(app(f, 0), n) → app(app(hd, app(app(map, f), app(app(cons, 0), nil))), n)
app(app(map, f), nil) → nil
app(app(map, f), app(app(cons, x), xs)) → app(app(cons, app(f, x)), app(app(map, f), xs))

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

(7) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = APP(app(f, 0), n) evaluates to t =APP(app(cons, 0), nil)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Matcher: [f / cons, n / nil]
  • Semiunifier: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from APP(app(f, 0), n) to APP(app(cons, 0), nil).



(8) NO