(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → cons(x, l)
append(l1, l2) → ifappend(l1, l2, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2))
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:
APPEND(l1, l2) → IFAPPEND(l1, l2, is_empty(l1))
APPEND(l1, l2) → IS_EMPTY(l1)
IFAPPEND(l1, l2, false) → HD(l1)
IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)
IFAPPEND(l1, l2, false) → TL(l1)
The TRS R consists of the following rules:
is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → cons(x, l)
append(l1, l2) → ifappend(l1, l2, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2))
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 3 less nodes.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
IFAPPEND(l1, l2, false) → APPEND(tl(l1), l2)
APPEND(l1, l2) → IFAPPEND(l1, l2, is_empty(l1))
The TRS R consists of the following rules:
is_empty(nil) → true
is_empty(cons(x, l)) → false
hd(cons(x, l)) → x
tl(cons(x, l)) → cons(x, l)
append(l1, l2) → ifappend(l1, l2, is_empty(l1))
ifappend(l1, l2, true) → l2
ifappend(l1, l2, false) → cons(hd(l1), append(tl(l1), l2))
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(5) NonLoopProof (EQUIVALENT transformation)
By Theorem 8 [NONLOOP] we deduce infiniteness of the QDP.
We apply the theorem with m = 1, b = 0,
σ' = [ ], and μ' = [ ] on the rule
IFAPPEND(cons(x2, x0), x1, false)[ ]n[ ] → IFAPPEND(cons(x2, x0), x1, false)[ ]n[ ]
This rule is correct for the QDP as the following derivation shows:
IFAPPEND(cons(x2, x0), x1, false)[ ]n[ ] → IFAPPEND(cons(x2, x0), x1, false)[ ]n[ ]
by Narrowing at position: [2]
IFAPPEND(cons(x2, x0), x1, false)[ ]n[ ] → IFAPPEND(cons(x2, x0), x1, is_empty(cons(x2, x0)))[ ]n[ ]
by Narrowing at position: []
intermediate steps: Instantiation
IFAPPEND(cons(y1, y0), x1, false)[ ]n[ ] → APPEND(cons(y1, y0), x1)[ ]n[ ]
by Narrowing at position: [0]
intermediate steps: Instantiation - Instantiation
IFAPPEND(l1, l2, false)[ ]n[ ] → APPEND(tl(l1), l2)[ ]n[ ]
by OriginalRule from TRS P
intermediate steps: Instantiation
tl(cons(x, l))[ ]n[ ] → cons(x, l)[ ]n[ ]
by OriginalRule from TRS R
intermediate steps: Instantiation - Instantiation - Instantiation
APPEND(l1, l2)[ ]n[ ] → IFAPPEND(l1, l2, is_empty(l1))[ ]n[ ]
by OriginalRule from TRS P
intermediate steps: Instantiation - Instantiation - Instantiation
is_empty(cons(x, l))[ ]n[ ] → false[ ]n[ ]
by OriginalRule from TRS R
(6) NO