(0) Obligation:
Clauses:
len([], X) :- ','(!, eq(X, 0)).
len(Xs, s(N)) :- ','(tail(Xs, Ys), len(Ys, N)).
tail([], []).
tail(.(X, Xs), Xs).
eq(X, X).
Queries:
len(g,a).
(1) CutEliminatorProof (SOUND transformation)
Eliminated all cuts by simply ignoring them[PROLOG].
(2) Obligation:
Clauses:
len([], X) :- eq(X, 0).
len(Xs, s(N)) :- ','(tail(Xs, Ys), len(Ys, N)).
tail([], []).
tail(.(X, Xs), Xs).
eq(X, X).
Queries:
len(g,a).
(3) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
len_in: (b,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x3)
s(
x1) =
s(
x1)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(4) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x3)
s(
x1) =
s(
x1)
(5) 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:
LEN_IN_GA([], X) → U1_GA(X, eq_in_ag(X, 0))
LEN_IN_GA([], X) → EQ_IN_AG(X, 0)
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
LEN_IN_GA(Xs, s(N)) → TAIL_IN_GA(Xs, Ys)
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → U3_GA(Xs, N, len_in_ga(Ys, N))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x3)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x3)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x3)
We have to consider all (P,R,Pi)-chains
(6) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LEN_IN_GA([], X) → U1_GA(X, eq_in_ag(X, 0))
LEN_IN_GA([], X) → EQ_IN_AG(X, 0)
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
LEN_IN_GA(Xs, s(N)) → TAIL_IN_GA(Xs, Ys)
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → U3_GA(Xs, N, len_in_ga(Ys, N))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x3)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x3)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x3)
We have to consider all (P,R,Pi)-chains
(7) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 4 less nodes.
(8) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x3)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x3)
We have to consider all (P,R,Pi)-chains
(9) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(10) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
The argument filtering Pi contains the following mapping:
[] =
[]
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x2)
.(
x1,
x2) =
.(
x1,
x2)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x3)
We have to consider all (P,R,Pi)-chains
(11) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(12) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs) → U2_GA(tail_in_ga(Xs))
U2_GA(tail_out_ga(Ys)) → LEN_IN_GA(Ys)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([])
tail_in_ga(.(X, Xs)) → tail_out_ga(Xs)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(13) 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(.(X, Xs)) → tail_out_ga(Xs)
Used ordering: POLO with Polynomial interpretation [POLO]:
POL(.(x1, x2)) = x1 + 2·x2
POL(LEN_IN_GA(x1)) = x1
POL(U2_GA(x1)) = x1
POL([]) = 0
POL(tail_in_ga(x1)) = x1
POL(tail_out_ga(x1)) = 2·x1
(14) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs) → U2_GA(tail_in_ga(Xs))
U2_GA(tail_out_ga(Ys)) → LEN_IN_GA(Ys)
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.
(15) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
LEN_IN_GA(
Xs) →
U2_GA(
tail_in_ga(
Xs)) at position [0] we obtained the following new rules [LPAR04]:
LEN_IN_GA([]) → U2_GA(tail_out_ga([]))
(16) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(tail_out_ga(Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA(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.
(17) 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.
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(tail_out_ga(Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA(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.
(19) 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)
(20) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(tail_out_ga(Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA(tail_out_ga([]))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(21) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U2_GA(
tail_out_ga(
Ys)) →
LEN_IN_GA(
Ys) we obtained the following new rules [LPAR04]:
U2_GA(tail_out_ga([])) → LEN_IN_GA([])
(22) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LEN_IN_GA([]) → U2_GA(tail_out_ga([]))
U2_GA(tail_out_ga([])) → LEN_IN_GA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(23) 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_GA(
tail_out_ga(
[])) evaluates to t =
U2_GA(
tail_out_ga(
[]))
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceU2_GA(tail_out_ga([])) →
LEN_IN_GA(
[])
with rule
U2_GA(
tail_out_ga(
[])) →
LEN_IN_GA(
[]) at position [] and matcher [ ]
LEN_IN_GA([]) →
U2_GA(
tail_out_ga(
[]))
with rule
LEN_IN_GA(
[]) →
U2_GA(
tail_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.
(24) FALSE
(25) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
len_in: (b,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x1,
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x1,
x3)
s(
x1) =
s(
x1)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(26) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x1,
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x1,
x3)
s(
x1) =
s(
x1)
(27) 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:
LEN_IN_GA([], X) → U1_GA(X, eq_in_ag(X, 0))
LEN_IN_GA([], X) → EQ_IN_AG(X, 0)
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
LEN_IN_GA(Xs, s(N)) → TAIL_IN_GA(Xs, Ys)
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → U3_GA(Xs, N, len_in_ga(Ys, N))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x1,
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x1,
x3)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x1,
x3)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
(28) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LEN_IN_GA([], X) → U1_GA(X, eq_in_ag(X, 0))
LEN_IN_GA([], X) → EQ_IN_AG(X, 0)
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
LEN_IN_GA(Xs, s(N)) → TAIL_IN_GA(Xs, Ys)
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → U3_GA(Xs, N, len_in_ga(Ys, N))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x1,
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x1,
x3)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U1_GA(
x1,
x2) =
U1_GA(
x2)
EQ_IN_AG(
x1,
x2) =
EQ_IN_AG(
x2)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x1,
x3)
TAIL_IN_GA(
x1,
x2) =
TAIL_IN_GA(
x1)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
(29) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 4 less nodes.
(30) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
len_in_ga([], X) → U1_ga(X, eq_in_ag(X, 0))
eq_in_ag(X, X) → eq_out_ag(X, X)
U1_ga(X, eq_out_ag(X, 0)) → len_out_ga([], X)
len_in_ga(Xs, s(N)) → U2_ga(Xs, N, tail_in_ga(Xs, Ys))
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
U2_ga(Xs, N, tail_out_ga(Xs, Ys)) → U3_ga(Xs, N, len_in_ga(Ys, N))
U3_ga(Xs, N, len_out_ga(Ys, N)) → len_out_ga(Xs, s(N))
The argument filtering Pi contains the following mapping:
len_in_ga(
x1,
x2) =
len_in_ga(
x1)
[] =
[]
U1_ga(
x1,
x2) =
U1_ga(
x2)
eq_in_ag(
x1,
x2) =
eq_in_ag(
x2)
eq_out_ag(
x1,
x2) =
eq_out_ag(
x1,
x2)
0 =
0
len_out_ga(
x1,
x2) =
len_out_ga(
x1,
x2)
U2_ga(
x1,
x2,
x3) =
U2_ga(
x1,
x3)
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
U3_ga(
x1,
x2,
x3) =
U3_ga(
x1,
x3)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
(31) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(32) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs, s(N)) → U2_GA(Xs, N, tail_in_ga(Xs, Ys))
U2_GA(Xs, N, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys, N)
The TRS R consists of the following rules:
tail_in_ga([], []) → tail_out_ga([], [])
tail_in_ga(.(X, Xs), Xs) → tail_out_ga(.(X, Xs), Xs)
The argument filtering Pi contains the following mapping:
[] =
[]
tail_in_ga(
x1,
x2) =
tail_in_ga(
x1)
tail_out_ga(
x1,
x2) =
tail_out_ga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
s(
x1) =
s(
x1)
LEN_IN_GA(
x1,
x2) =
LEN_IN_GA(
x1)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
(33) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(34) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LEN_IN_GA(Xs) → U2_GA(Xs, tail_in_ga(Xs))
U2_GA(Xs, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys)
The TRS R consists of the following rules:
tail_in_ga([]) → tail_out_ga([], [])
tail_in_ga(.(X, Xs)) → tail_out_ga(.(X, Xs), Xs)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(35) Narrowing (SOUND transformation)
By narrowing [LPAR04] the rule
LEN_IN_GA(
Xs) →
U2_GA(
Xs,
tail_in_ga(
Xs)) at position [1] we obtained the following new rules [LPAR04]:
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
LEN_IN_GA(.(x0, x1)) → U2_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
(36) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(Xs, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
LEN_IN_GA(.(x0, x1)) → U2_GA(.(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(.(X, Xs)) → tail_out_ga(.(X, Xs), Xs)
The set Q consists of the following terms:
tail_in_ga(x0)
We have to consider all (P,Q,R)-chains.
(37) 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.
(38) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(Xs, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
LEN_IN_GA(.(x0, x1)) → U2_GA(.(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.
(39) 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)
(40) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(Xs, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
LEN_IN_GA(.(x0, x1)) → U2_GA(.(x0, x1), tail_out_ga(.(x0, x1), x1))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(41) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04].
The following pairs can be oriented strictly and are deleted.
LEN_IN_GA(.(x0, x1)) → U2_GA(.(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(LEN_IN_GA(x1)) = x1
POL(U2_GA(x1, x2)) = x2
POL([]) = 0
POL(tail_out_ga(x1, x2)) = x2
The following usable rules [FROCOS05] were oriented:
none
(42) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GA(Xs, tail_out_ga(Xs, Ys)) → LEN_IN_GA(Ys)
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(43) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U2_GA(
Xs,
tail_out_ga(
Xs,
Ys)) →
LEN_IN_GA(
Ys) we obtained the following new rules [LPAR04]:
U2_GA([], tail_out_ga([], [])) → LEN_IN_GA([])
(44) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
U2_GA([], tail_out_ga([], [])) → LEN_IN_GA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(45) Instantiation (EQUIVALENT transformation)
By instantiating [LPAR04] the rule
U2_GA(
Xs,
tail_out_ga(
Xs,
Ys)) →
LEN_IN_GA(
Ys) we obtained the following new rules [LPAR04]:
U2_GA([], tail_out_ga([], [])) → LEN_IN_GA([])
(46) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LEN_IN_GA([]) → U2_GA([], tail_out_ga([], []))
U2_GA([], tail_out_ga([], [])) → LEN_IN_GA([])
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(47) 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_GA(
[],
tail_out_ga(
[],
[])) evaluates to t =
U2_GA(
[],
tail_out_ga(
[],
[]))
Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Matcher: [ ]
- Semiunifier: [ ]
Rewriting sequenceU2_GA([], tail_out_ga([], [])) →
LEN_IN_GA(
[])
with rule
U2_GA(
[],
tail_out_ga(
[],
[])) →
LEN_IN_GA(
[]) at position [] and matcher [ ]
LEN_IN_GA([]) →
U2_GA(
[],
tail_out_ga(
[],
[]))
with rule
LEN_IN_GA(
[]) →
U2_GA(
[],
tail_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.
(48) FALSE