(0) Obligation:
Clauses:
app([], L, L) :- !.
app(X, Y, .(H, Z)) :- ','(head(X, H), ','(tail(X, T), app(T, Y, Z))).
head([], X1).
head(.(X, X2), X).
tail([], []).
tail(.(X3, Xs), Xs).
Queries:
app(g,a,a).
(1) CutEliminatorProof (SOUND transformation)
Eliminated all cuts by simply ignoring them[PROLOG].
(2) Obligation:
Clauses:
app([], L, L) :- true.
app(X, Y, .(H, Z)) :- ','(head(X, H), ','(tail(X, T), app(T, Y, Z))).
head([], X1).
head(.(X, X2), X).
tail([], []).
tail(.(X3, Xs), Xs).
Queries:
app(g,a,a).
(3) UndefinedPredicateHandlerProof (SOUND transformation)
Added facts for all undefined predicates [PROLOG].
(4) Obligation:
Clauses:
app([], L, L) :- true.
app(X, Y, .(H, Z)) :- ','(head(X, H), ','(tail(X, T), app(T, Y, Z))).
head([], X1).
head(.(X, X2), X).
tail([], []).
tail(.(X3, Xs), Xs).
true.
Queries:
app(g,a,a).
(5) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
app_in: (b,f,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x5)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(6) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x5)
(7) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([], L, L) → U1_GAA(L, true_in_)
APP_IN_GAA([], L, L) → TRUE_IN_
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GAA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → U4_GAA(X, Y, H, Z, app_in_gaa(T, Y, Z))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x5)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U1_GAA(
x1,
x2) =
U1_GAA(
x2)
TRUE_IN_ =
TRUE_IN_
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GAA(
x1,
x2,
x3,
x4,
x5) =
U4_GAA(
x5)
We have to consider all (P,R,Pi)-chains
(8) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([], L, L) → U1_GAA(L, true_in_)
APP_IN_GAA([], L, L) → TRUE_IN_
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GAA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → U4_GAA(X, Y, H, Z, app_in_gaa(T, Y, Z))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x5)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U1_GAA(
x1,
x2) =
U1_GAA(
x2)
TRUE_IN_ =
TRUE_IN_
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GAA(
x1,
x2,
x3,
x4,
x5) =
U4_GAA(
x5)
We have to consider all (P,R,Pi)-chains
(9) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 5 less nodes.
(10) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x5)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x5)
We have to consider all (P,R,Pi)-chains
(11) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(12) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
The argument filtering Pi contains the following mapping:
[] =
[]
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga
.(
x1,
x2) =
.(
x1,
x2)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x5)
We have to consider all (P,R,Pi)-chains
(13) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X) → U2_GAA(X, head_in_ga(X))
U2_GAA(X, head_out_ga) → U3_GAA(tail_in_ga(X))
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
The TRS R consists of the following rules:
head_in_ga([]) → head_out_ga
head_in_ga(.(X, X2)) → head_out_ga
tail_in_ga([]) → tail_out_ga([])
tail_in_ga(.(X3, Xs)) → tail_out_ga(Xs)
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(15) UsableRulesReductionPairsProof (EQUIVALENT transformation)
By using the usable rules with reduction pair processor [LPAR04] with a polynomial ordering [POLO], all dependency pairs and the corresponding usable rules [FROCOS05] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.
No dependency pairs are removed.
The following rules are removed from R:
tail_in_ga(.(X3, Xs)) → tail_out_ga(Xs)
head_in_ga(.(X, X2)) → head_out_ga
Used ordering: POLO with Polynomial interpretation [POLO]:
POL(.(x1, x2)) = 1 + x1 + 2·x2
POL(APP_IN_GAA(x1)) = 2·x1
POL(U2_GAA(x1, x2)) = x1 + x2
POL(U3_GAA(x1)) = x1
POL([]) = 0
POL(head_in_ga(x1)) = x1
POL(head_out_ga) = 0
POL(tail_in_ga(x1)) = x1
POL(tail_out_ga(x1)) = 2·x1
(16) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X) → U2_GAA(X, head_in_ga(X))
U2_GAA(X, head_out_ga) → U3_GAA(tail_in_ga(X))
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(17) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
APP_IN_GAA(
X) →
U2_GAA(
X,
head_in_ga(
X)) at position [1] we obtained the following new rules [LPAR04]:
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GAA(X, head_out_ga) → U3_GAA(tail_in_ga(X))
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
head_in_ga([]) → head_out_ga
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(19) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(20) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GAA(X, head_out_ga) → U3_GAA(tail_in_ga(X))
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(21) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
head_in_ga(x0)
(22) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GAA(X, head_out_ga) → U3_GAA(tail_in_ga(X))
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(23) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
U2_GAA(
X,
head_out_ga) →
U3_GAA(
tail_in_ga(
X)) at position [0] we obtained the following new rules [LPAR04]:
U2_GAA([], head_out_ga) → U3_GAA(tail_out_ga([]))
(24) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
U2_GAA([], head_out_ga) → U3_GAA(tail_out_ga([]))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(25) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(26) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
U2_GAA([], head_out_ga) → U3_GAA(tail_out_ga([]))
R is empty.
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(27) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
tail_in_ga(x0)
(28) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(tail_out_ga(T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
U2_GAA([], head_out_ga) → U3_GAA(tail_out_ga([]))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(29) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U3_GAA(
tail_out_ga(
T)) →
APP_IN_GAA(
T) we obtained the following new rules [LPAR04]:
U3_GAA(tail_out_ga([])) → APP_IN_GAA([])
(30) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([]) → U2_GAA([], head_out_ga)
U2_GAA([], head_out_ga) → U3_GAA(tail_out_ga([]))
U3_GAA(tail_out_ga([])) → APP_IN_GAA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(31) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:
s =
U2_GAA(
[],
head_out_ga) evaluates to t =
U2_GAA(
[],
head_out_ga)
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceU2_GAA([], head_out_ga) →
U3_GAA(
tail_out_ga(
[]))
with rule
U2_GAA(
[],
head_out_ga) →
U3_GAA(
tail_out_ga(
[])) at position [] and matcher [ ]
U3_GAA(tail_out_ga([])) →
APP_IN_GAA(
[])
with rule
U3_GAA(
tail_out_ga(
[])) →
APP_IN_GAA(
[]) at position [] and matcher [ ]
APP_IN_GAA([]) →
U2_GAA(
[],
head_out_ga)
with rule
APP_IN_GAA(
[]) →
U2_GAA(
[],
head_out_ga)
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.
(32) FALSE
(33) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
app_in: (b,f,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa(
x1)
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x1,
x5)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(34) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa(
x1)
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x1,
x5)
(35) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([], L, L) → U1_GAA(L, true_in_)
APP_IN_GAA([], L, L) → TRUE_IN_
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GAA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → U4_GAA(X, Y, H, Z, app_in_gaa(T, Y, Z))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa(
x1)
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x1,
x5)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U1_GAA(
x1,
x2) =
U1_GAA(
x2)
TRUE_IN_ =
TRUE_IN_
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x1,
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GAA(
x1,
x2,
x3,
x4,
x5) =
U4_GAA(
x1,
x5)
We have to consider all (P,R,Pi)-chains
(36) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([], L, L) → U1_GAA(L, true_in_)
APP_IN_GAA([], L, L) → TRUE_IN_
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
APP_IN_GAA(X, Y, .(H, Z)) → HEAD_IN_GA(X, H)
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → TAIL_IN_GA(X, T)
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → U4_GAA(X, Y, H, Z, app_in_gaa(T, Y, Z))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa(
x1)
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x1,
x5)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U1_GAA(
x1,
x2) =
U1_GAA(
x2)
TRUE_IN_ =
TRUE_IN_
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
HEAD_IN_GA(
x1,
x2) =
HEAD_IN_GA(
x1)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x1,
x5)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U4_GAA(
x1,
x2,
x3,
x4,
x5) =
U4_GAA(
x1,
x5)
We have to consider all (P,R,Pi)-chains
(37) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 5 less nodes.
(38) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
app_in_gaa([], L, L) → U1_gaa(L, true_in_)
true_in_ → true_out_
U1_gaa(L, true_out_) → app_out_gaa([], L, L)
app_in_gaa(X, Y, .(H, Z)) → U2_gaa(X, Y, H, Z, head_in_ga(X, H))
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
U2_gaa(X, Y, H, Z, head_out_ga(X, H)) → U3_gaa(X, Y, H, Z, tail_in_ga(X, T))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
U3_gaa(X, Y, H, Z, tail_out_ga(X, T)) → U4_gaa(X, Y, H, Z, app_in_gaa(T, Y, Z))
U4_gaa(X, Y, H, Z, app_out_gaa(T, Y, Z)) → app_out_gaa(X, Y, .(H, Z))
The argument filtering Pi contains the following mapping:
app_in_gaa(
x1,
x2,
x3) =
app_in_gaa(
x1)
[] =
[]
U1_gaa(
x1,
x2) =
U1_gaa(
x2)
true_in_ =
true_in_
true_out_ =
true_out_
app_out_gaa(
x1,
x2,
x3) =
app_out_gaa(
x1)
U2_gaa(
x1,
x2,
x3,
x4,
x5) =
U2_gaa(
x1,
x5)
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x1,
x2)
U3_gaa(
x1,
x2,
x3,
x4,
x5) =
U3_gaa(
x1,
x5)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
U4_gaa(
x1,
x2,
x3,
x4,
x5) =
U4_gaa(
x1,
x5)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x1,
x5)
We have to consider all (P,R,Pi)-chains
(39) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(40) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X, Y, .(H, Z)) → U2_GAA(X, Y, H, Z, head_in_ga(X, H))
U2_GAA(X, Y, H, Z, head_out_ga(X, H)) → U3_GAA(X, Y, H, Z, tail_in_ga(X, T))
U3_GAA(X, Y, H, Z, tail_out_ga(X, T)) → APP_IN_GAA(T, Y, Z)
The TRS R consists of the following rules:
head_in_ga([], X1) → head_out_ga([], X1)
head_in_ga(.(X, X2), X) → head_out_ga(.(X, X2), X)
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs), Xs) → tail_out_ga(.(X3, Xs), Xs)
The argument filtering Pi contains the following mapping:
[] =
[]
head_in_ga(
x1,
x2) =
head_in_ga(
x1)
head_out_ga(
x1,
x2) =
head_out_ga(
x1)
.(
x1,
x2) =
.(
x1,
x2)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
APP_IN_GAA(
x1,
x2,
x3) =
APP_IN_GAA(
x1)
U2_GAA(
x1,
x2,
x3,
x4,
x5) =
U2_GAA(
x1,
x5)
U3_GAA(
x1,
x2,
x3,
x4,
x5) =
U3_GAA(
x1,
x5)
We have to consider all (P,R,Pi)-chains
(41) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(42) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA(X) → U2_GAA(X, head_in_ga(X))
U2_GAA(X, head_out_ga(X)) → U3_GAA(X, tail_in_ga(X))
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
The TRS R consists of the following rules:
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X, X2)) → head_out_ga(.(X, X2))
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs)) → tail_out_ga(.(X3, Xs), Xs)
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(43) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
APP_IN_GAA(
X) →
U2_GAA(
X,
head_in_ga(
X)) at position [1] we obtained the following new rules [LPAR04]:
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
(44) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GAA(X, head_out_ga(X)) → U3_GAA(X, tail_in_ga(X))
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
The TRS R consists of the following rules:
head_in_ga([]) → head_out_ga([])
head_in_ga(.(X, X2)) → head_out_ga(.(X, X2))
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs)) → tail_out_ga(.(X3, Xs), Xs)
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(45) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(46) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GAA(X, head_out_ga(X)) → U3_GAA(X, tail_in_ga(X))
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs)) → tail_out_ga(.(X3, Xs), Xs)
The set Q consists of the following terms:
head_in_ga(x0)
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(47) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
head_in_ga(x0)
(48) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GAA(X, head_out_ga(X)) → U3_GAA(X, tail_in_ga(X))
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs)) → tail_out_ga(.(X3, Xs), Xs)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(49) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
U2_GAA(
X,
head_out_ga(
X)) →
U3_GAA(
X,
tail_in_ga(
X)) at position [1] we obtained the following new rules [LPAR04]:
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U2_GAA(.(x0, x1), head_out_ga(.(x0, x1))) → U3_GAA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
(50) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U2_GAA(.(x0, x1), head_out_ga(.(x0, x1))) → U3_GAA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(X3, Xs)) → tail_out_ga(.(X3, Xs), Xs)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(51) UsableRulesProof (EQUIVALENT transformation)
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.
(52) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U2_GAA(.(x0, x1), head_out_ga(.(x0, x1))) → U3_GAA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
R is empty.
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(53) QReductionProof (EQUIVALENT transformation)
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].
tail_in_ga(x0)
(54) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U2_GAA(.(x0, x1), head_out_ga(.(x0, x1))) → U3_GAA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(55) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04].
The following pairs can be oriented strictly and are deleted.
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:
POL(U3_GAA(x1, x2)) = | 0 | + | | · | x1 | + | | · | x2 |
POL(tail_out_ga(x1, x2)) = | | + | | · | x1 | + | | · | x2 |
POL(APP_IN_GAA(x1)) = | 0 | + | | · | x1 |
POL(U2_GAA(x1, x2)) = | 0 | + | | · | x1 | + | | · | x2 |
POL(head_out_ga(x1)) = | | + | | · | x1 |
POL(.(x1, x2)) = | | + | | · | x1 | + | | · | x2 |
The following usable rules [FROCOS05] were oriented:
none
(56) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U2_GAA(.(x0, x1), head_out_ga(.(x0, x1))) → U3_GAA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(57) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.
(58) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(59) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U3_GAA(
X,
tail_out_ga(
X,
T)) →
APP_IN_GAA(
T) we obtained the following new rules [LPAR04]:
U3_GAA([], tail_out_ga([], [])) → APP_IN_GAA([])
(60) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U3_GAA([], tail_out_ga([], [])) → APP_IN_GAA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(61) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U3_GAA(
X,
tail_out_ga(
X,
T)) →
APP_IN_GAA(
T) we obtained the following new rules [LPAR04]:
U3_GAA([], tail_out_ga([], [])) → APP_IN_GAA([])
(62) Obligation:
Q DP problem:
The TRS P consists of the following rules:
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
U3_GAA([], tail_out_ga([], [])) → APP_IN_GAA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(63) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:
s =
U2_GAA(
[],
head_out_ga(
[])) evaluates to t =
U2_GAA(
[],
head_out_ga(
[]))
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceU2_GAA([], head_out_ga([])) →
U3_GAA(
[],
tail_out_ga(
[],
[]))
with rule
U2_GAA(
[],
head_out_ga(
[])) →
U3_GAA(
[],
tail_out_ga(
[],
[])) at position [] and matcher [ ]
U3_GAA([], tail_out_ga([], [])) →
APP_IN_GAA(
[])
with rule
U3_GAA(
[],
tail_out_ga(
[],
[])) →
APP_IN_GAA(
[]) at position [] and matcher [ ]
APP_IN_GAA([]) →
U2_GAA(
[],
head_out_ga(
[]))
with rule
APP_IN_GAA(
[]) →
U2_GAA(
[],
head_out_ga(
[]))
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.
(64) FALSE
(65) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04].
The following pairs can be oriented strictly and are deleted.
U2_GAA(.(x0, x1), head_out_ga(.(x0, x1))) → U3_GAA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:
POL(.(x1, x2)) = 1 + x2
POL(APP_IN_GAA(x1)) = x1
POL(U2_GAA(x1, x2)) = x2
POL(U3_GAA(x1, x2)) = x2
POL([]) = 0
POL(head_out_ga(x1)) = x1
POL(tail_out_ga(x1, x2)) = x2
The following usable rules [FROCOS05] were oriented:
none
(66) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GAA(X, tail_out_ga(X, T)) → APP_IN_GAA(T)
APP_IN_GAA([]) → U2_GAA([], head_out_ga([]))
APP_IN_GAA(.(x0, x1)) → U2_GAA(.(x0, x1), head_out_ga(.(x0, x1)))
U2_GAA([], head_out_ga([])) → U3_GAA([], tail_out_ga([], []))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.