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), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)



↳ QTRS
  ↳ DependencyPairsProof

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

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)


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(plus, app(s, x)), y) → APP(app(plus, x), y)
APP(app(mult, app(s, x)), y) → APP(plus, y)
HAMMING → LIST1
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), app(app(cons, y), ys))
LIST1 → APP(s, app(s, 0))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(lt, x), y)
APP(app(mult, app(s, x)), y) → APP(mult, x)
APP(app(plus, app(s, x)), y) → APP(s, app(app(plus, x), y))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(lt, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(if, app(app(eq, x), y))
LIST3 → APP(s, app(s, app(s, app(s, 0))))
LIST2 → APP(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
LIST2 → APP(map, app(mult, app(s, app(s, app(s, 0)))))
HAMMING → APP(merge, list1)
LIST2 → APP(s, app(s, app(s, 0)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys))))
HAMMING → APP(s, 0)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(merge, xs)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys)))
LIST3 → APP(s, 0)
LIST2 → APP(mult, app(s, app(s, app(s, 0))))
APP(app(mult, app(s, x)), y) → APP(app(mult, x), y)
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
HAMMING → APP(app(merge, list1), app(app(merge, list2), list3))
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
LIST3 → APP(mult, app(s, app(s, app(s, app(s, app(s, 0))))))
LIST3 → APP(s, app(s, app(s, app(s, app(s, 0)))))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(cons, x), app(app(merge, xs), ys))
APP(app(mult, app(s, x)), y) → APP(app(plus, y), app(app(mult, x), y))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(eq, x)
APP(app(lt, app(s, x)), app(s, y)) → APP(lt, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))
LIST2 → HAMMING
HAMMING → APP(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
HAMMING → APP(merge, list2)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(eq, x), y)
LIST1 → HAMMING
LIST1 → APP(mult, app(s, app(s, 0)))
LIST3 → APP(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0)))))))
HAMMING → LIST3
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys)))
HAMMING → APP(cons, app(s, 0))
LIST3 → APP(s, app(s, 0))
HAMMING → LIST2
LIST1 → APP(app(map, app(mult, app(s, app(s, 0)))), hamming)
LIST1 → APP(map, app(mult, app(s, app(s, 0))))
HAMMING → APP(app(merge, list2), list3)
APP(app(lt, app(s, x)), app(s, y)) → APP(app(lt, x), y)
LIST3 → HAMMING
APP(app(plus, app(s, x)), y) → APP(plus, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
LIST3 → APP(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), ys)
LIST1 → APP(s, 0)
LIST2 → APP(s, app(s, 0))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(if, app(app(lt, x), y))
LIST3 → APP(s, app(s, app(s, 0)))
LIST2 → APP(s, 0)

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

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(plus, app(s, x)), y) → APP(app(plus, x), y)
APP(app(mult, app(s, x)), y) → APP(plus, y)
HAMMING → LIST1
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), app(app(cons, y), ys))
LIST1 → APP(s, app(s, 0))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(lt, x), y)
APP(app(mult, app(s, x)), y) → APP(mult, x)
APP(app(plus, app(s, x)), y) → APP(s, app(app(plus, x), y))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(lt, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(if, app(app(eq, x), y))
LIST3 → APP(s, app(s, app(s, app(s, 0))))
LIST2 → APP(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
LIST2 → APP(map, app(mult, app(s, app(s, app(s, 0)))))
HAMMING → APP(merge, list1)
LIST2 → APP(s, app(s, app(s, 0)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys))))
HAMMING → APP(s, 0)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(merge, xs)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys)))
LIST3 → APP(s, 0)
LIST2 → APP(mult, app(s, app(s, app(s, 0))))
APP(app(mult, app(s, x)), y) → APP(app(mult, x), y)
APP(app(map, f), app(app(cons, x), xs)) → APP(cons, app(f, x))
HAMMING → APP(app(merge, list1), app(app(merge, list2), list3))
APP(app(map, f), app(app(cons, x), xs)) → APP(app(cons, app(f, x)), app(app(map, f), xs))
LIST3 → APP(mult, app(s, app(s, app(s, app(s, app(s, 0))))))
LIST3 → APP(s, app(s, app(s, app(s, app(s, 0)))))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(cons, x), app(app(merge, xs), ys))
APP(app(mult, app(s, x)), y) → APP(app(plus, y), app(app(mult, x), y))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(eq, x)
APP(app(lt, app(s, x)), app(s, y)) → APP(lt, x)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))
LIST2 → HAMMING
HAMMING → APP(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))
APP(app(map, f), app(app(cons, x), xs)) → APP(app(map, f), xs)
HAMMING → APP(merge, list2)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(eq, x), y)
LIST1 → HAMMING
LIST1 → APP(mult, app(s, app(s, 0)))
LIST3 → APP(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0)))))))
HAMMING → LIST3
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys)))
HAMMING → APP(cons, app(s, 0))
LIST3 → APP(s, app(s, 0))
HAMMING → LIST2
LIST1 → APP(app(map, app(mult, app(s, app(s, 0)))), hamming)
LIST1 → APP(map, app(mult, app(s, app(s, 0))))
HAMMING → APP(app(merge, list2), list3)
APP(app(lt, app(s, x)), app(s, y)) → APP(app(lt, x), y)
LIST3 → HAMMING
APP(app(plus, app(s, x)), y) → APP(plus, x)
APP(app(map, f), app(app(cons, x), xs)) → APP(f, x)
LIST3 → APP(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), ys)
LIST1 → APP(s, 0)
LIST2 → APP(s, app(s, 0))
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(if, app(app(lt, x), y))
LIST3 → APP(s, app(s, app(s, 0)))
LIST2 → APP(s, 0)

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

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

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(plus, app(s, x)), y) → APP(app(plus, x), y)

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(plus, app(s, x)), y) → APP(app(plus, x), y)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

list3
list2
list1
hamming



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(plus, app(s, x)), y) → APP(app(plus, x), y)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
app(app(lt, x0), 0)
app(app(merge, x0), nil)
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

plus1(s(x), y) → plus1(x, y)

R is empty.
The set Q consists of the following terms:

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
                          ↳ QDP
                            ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

plus1(s(x), y) → plus1(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(mult, app(s, x)), y) → APP(app(mult, x), y)

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(mult, app(s, x)), y) → APP(app(mult, x), y)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

list3
list2
list1
hamming



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(mult, app(s, x)), y) → APP(app(mult, x), y)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
app(app(lt, x0), 0)
app(app(merge, x0), nil)
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

mult1(s(x), y) → mult1(x, y)

R is empty.
The set Q consists of the following terms:

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
                          ↳ QDP
                            ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

mult1(s(x), y) → mult1(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(lt, app(s, x)), app(s, y)) → APP(app(lt, x), y)

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(lt, app(s, x)), app(s, y)) → APP(app(lt, x), y)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

list3
list2
list1
hamming



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

APP(app(lt, app(s, x)), app(s, y)) → APP(app(lt, x), y)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
app(app(lt, x0), 0)
app(app(merge, x0), nil)
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

lt1(s(x), s(y)) → lt1(x, y)

R is empty.
The set Q consists of the following terms:

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
                          ↳ QDP
                            ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

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

lt1(s(x), s(y)) → lt1(x, y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

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

APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), app(app(cons, y), ys))

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
          ↳ QDP
          ↳ QDP

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

APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), app(app(cons, y), ys))

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

list3
list2
list1
hamming



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
          ↳ QDP
          ↳ QDP

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

APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, app(app(cons, x), xs)), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), ys)
APP(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → APP(app(merge, xs), app(app(cons, y), ys))

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
app(app(lt, x0), 0)
app(app(merge, x0), nil)
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We have applied the A-Transformation [17] to get from an applicative problem to a standard problem.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
          ↳ QDP
          ↳ QDP

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

merge1(cons(x, xs), cons(y, ys)) → merge1(xs, cons(y, ys))
merge1(cons(x, xs), cons(y, ys)) → merge1(xs, ys)
merge1(cons(x, xs), cons(y, ys)) → merge1(cons(x, xs), ys)

R is empty.
The set Q consists of the following terms:

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

map(x0, nil)
plus(0, x0)
if(false, x0, x1)
eq(0, s(x0))
eq(x0, x0)
lt(x0, 0)
merge(x0, nil)
merge(cons(x0, x1), cons(x2, x3))
lt(s(x0), s(x1))
eq(s(x0), 0)
lt(0, s(x0))
merge(nil, x0)
if(true, x0, x1)
map(x0, cons(x1, x2))
mult(s(x0), x1)
plus(s(x0), x1)
mult(0, x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ ATransformationProof
                      ↳ QDP
                        ↳ QReductionProof
                          ↳ QDP
                            ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

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

merge1(cons(x, xs), cons(y, ys)) → merge1(xs, cons(y, ys))
merge1(cons(x, xs), cons(y, ys)) → merge1(xs, ys)
merge1(cons(x, xs), cons(y, ys)) → merge1(cons(x, xs), ys)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
          ↳ QDP

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

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(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
          ↳ QDP

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

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)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

list3
list2
list1
hamming



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ QDPSizeChangeProof
          ↳ QDP

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

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)

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
app(app(lt, x0), 0)
app(app(merge, x0), nil)
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof

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

HAMMING → LIST3
HAMMING → LIST2
HAMMING → LIST1
LIST3 → HAMMING
LIST2 → HAMMING
LIST1 → HAMMING

The TRS R consists of the following rules:

app(app(app(if, true), xs), ys) → xs
app(app(app(if, false), xs), ys) → ys
app(app(lt, app(s, x)), app(s, y)) → app(app(lt, x), y)
app(app(lt, 0), app(s, y)) → true
app(app(lt, y), 0) → false
app(app(eq, x), x) → true
app(app(eq, app(s, x)), 0) → false
app(app(eq, 0), app(s, x)) → false
app(app(merge, xs), nil) → xs
app(app(merge, nil), ys) → ys
app(app(merge, app(app(cons, x), xs)), app(app(cons, y), ys)) → app(app(app(if, app(app(lt, x), y)), app(app(cons, x), app(app(merge, xs), app(app(cons, y), ys)))), app(app(app(if, app(app(eq, x), y)), app(app(cons, x), app(app(merge, xs), ys))), app(app(cons, y), app(app(merge, app(app(cons, x), xs)), ys))))
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))
app(app(mult, 0), x) → 0
app(app(mult, app(s, x)), y) → app(app(plus, y), app(app(mult, x), y))
app(app(plus, 0), x) → 0
app(app(plus, app(s, x)), y) → app(s, app(app(plus, x), y))
list1 → app(app(map, app(mult, app(s, app(s, 0)))), hamming)
list2 → app(app(map, app(mult, app(s, app(s, app(s, 0))))), hamming)
list3 → app(app(map, app(mult, app(s, app(s, app(s, app(s, app(s, 0))))))), hamming)
hamming → app(app(cons, app(s, 0)), app(app(merge, list1), app(app(merge, list2), list3)))

The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof

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

HAMMING → LIST3
HAMMING → LIST2
HAMMING → LIST1
LIST3 → HAMMING
LIST2 → HAMMING
LIST1 → HAMMING

R is empty.
The set Q consists of the following terms:

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

app(app(map, x0), nil)
app(app(plus, 0), x0)
app(app(app(if, false), x0), x1)
app(app(eq, 0), app(s, x0))
app(app(eq, x0), x0)
list3
list2
app(app(lt, x0), 0)
list1
app(app(merge, x0), nil)
hamming
app(app(merge, app(app(cons, x0), x1)), app(app(cons, x2), x3))
app(app(lt, app(s, x0)), app(s, x1))
app(app(eq, app(s, x0)), 0)
app(app(lt, 0), app(s, x0))
app(app(merge, nil), x0)
app(app(app(if, true), x0), x1)
app(app(map, x0), app(app(cons, x1), x2))
app(app(mult, app(s, x0)), x1)
app(app(plus, app(s, x0)), x1)
app(app(mult, 0), x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
              ↳ QDP
                ↳ QReductionProof
                  ↳ QDP
                    ↳ NonTerminationProof

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

HAMMING → LIST3
HAMMING → LIST2
HAMMING → LIST1
LIST3 → HAMMING
LIST2 → HAMMING
LIST1 → HAMMING

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

The TRS P consists of the following rules:

HAMMING → LIST3
HAMMING → LIST2
HAMMING → LIST1
LIST3 → HAMMING
LIST2 → HAMMING
LIST1 → HAMMING

The TRS R consists of the following rules:none


s = LIST3 evaluates to t =LIST3

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




Rewriting sequence

LIST3 → HAMMING
with rule LIST3 → HAMMING at position [] and matcher [ ]

HAMMING → LIST3
with rule HAMMING → LIST3

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.