(0) Obligation:

Clauses:

t(N) :- ','(ll(N, Xs), ','(select(X1, Xs, Xs1), ','(ll(M, Xs1), t(M)))).
t(0).
ll(s(N), .(X, Xs)) :- ll(N, Xs).
ll(0, []).
select(X, .(Y, Xs), .(Y, Ys)) :- select(X, Xs, Ys).
select(X, .(X, Xs), Xs).

Queries:

t(g).

(1) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
t_in: (b)
ll_in: (b,f) (f,b)
select_in: (f,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(2) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)

(3) 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:

T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))
T_IN_G(N) → LL_IN_GA(N, Xs)
LL_IN_GA(s(N), .(X, Xs)) → U5_GA(N, X, Xs, ll_in_ga(N, Xs))
LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)
U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U1_G(N, ll_out_ga(N, Xs)) → SELECT_IN_AGA(X1, Xs, Xs1)
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → U6_AGA(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → LL_IN_AG(M, Xs1)
LL_IN_AG(s(N), .(X, Xs)) → U5_AG(N, X, Xs, ll_in_ag(N, Xs))
LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)
U3_G(N, ll_out_ag(M, Xs1)) → U4_G(N, t_in_g(M))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x4)
U2_G(x1, x2)  =  U2_G(x1, x2)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)
U6_AGA(x1, x2, x3, x4, x5)  =  U6_AGA(x3, x5)
U3_G(x1, x2)  =  U3_G(x1, x2)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)
U5_AG(x1, x2, x3, x4)  =  U5_AG(x3, x4)
U4_G(x1, x2)  =  U4_G(x1, x2)

We have to consider all (P,R,Pi)-chains

(4) Obligation:

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

T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))
T_IN_G(N) → LL_IN_GA(N, Xs)
LL_IN_GA(s(N), .(X, Xs)) → U5_GA(N, X, Xs, ll_in_ga(N, Xs))
LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)
U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U1_G(N, ll_out_ga(N, Xs)) → SELECT_IN_AGA(X1, Xs, Xs1)
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → U6_AGA(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → LL_IN_AG(M, Xs1)
LL_IN_AG(s(N), .(X, Xs)) → U5_AG(N, X, Xs, ll_in_ag(N, Xs))
LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)
U3_G(N, ll_out_ag(M, Xs1)) → U4_G(N, t_in_g(M))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x1, x4)
U2_G(x1, x2)  =  U2_G(x1, x2)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)
U6_AGA(x1, x2, x3, x4, x5)  =  U6_AGA(x3, x5)
U3_G(x1, x2)  =  U3_G(x1, x2)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)
U5_AG(x1, x2, x3, x4)  =  U5_AG(x3, x4)
U4_G(x1, x2)  =  U4_G(x1, x2)

We have to consider all (P,R,Pi)-chains

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 7 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(8) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(9) Obligation:

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

LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(10) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(11) Obligation:

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

LL_IN_AG(.(Xs)) → LL_IN_AG(Xs)

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • LL_IN_AG(.(Xs)) → LL_IN_AG(Xs)
    The graph contains the following edges 1 > 1

(13) TRUE

(14) Obligation:

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

SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

(15) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(16) Obligation:

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

SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

(17) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(18) Obligation:

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

SELECT_IN_AGA(.(Xs)) → SELECT_IN_AGA(Xs)

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

(19) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • SELECT_IN_AGA(.(Xs)) → SELECT_IN_AGA(Xs)
    The graph contains the following edges 1 > 1

(20) TRUE

(21) Obligation:

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

LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(22) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(23) Obligation:

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

LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(24) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(25) Obligation:

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

LL_IN_GA(s(N)) → LL_IN_GA(N)

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

(26) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • LL_IN_GA(s(N)) → LL_IN_GA(N)
    The graph contains the following edges 1 > 1

(27) TRUE

(28) Obligation:

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

U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)
T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x1, x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
U3_g(x1, x2)  =  U3_g(x1, x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
U4_g(x1, x2)  =  U4_g(x1, x2)
t_out_g(x1)  =  t_out_g(x1)
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
U2_G(x1, x2)  =  U2_G(x1, x2)
U3_G(x1, x2)  =  U3_G(x1, x2)

We have to consider all (P,R,Pi)-chains

(29) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(30) Obligation:

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

U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)
T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))

The TRS R consists of the following rules:

select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))

The argument filtering Pi contains the following mapping:
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x1, x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x3, x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x2, x3)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x3, x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1, x2)
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
U2_G(x1, x2)  =  U2_G(x1, x2)
U3_G(x1, x2)  =  U3_G(x1, x2)

We have to consider all (P,R,Pi)-chains

(31) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(32) Obligation:

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

U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(Xs))
U2_G(N, select_out_aga(Xs, Xs1)) → U3_G(N, ll_in_ag(Xs1))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)
T_IN_G(N) → U1_G(N, ll_in_ga(N))

The TRS R consists of the following rules:

select_in_aga(.(Xs)) → U6_aga(Xs, select_in_aga(Xs))
select_in_aga(.(Xs)) → select_out_aga(.(Xs), Xs)
ll_in_ag(.(Xs)) → U5_ag(Xs, ll_in_ag(Xs))
ll_in_ag([]) → ll_out_ag(0, [])
ll_in_ga(s(N)) → U5_ga(N, ll_in_ga(N))
ll_in_ga(0) → ll_out_ga(0, [])
U6_aga(Xs, select_out_aga(Xs, Ys)) → select_out_aga(.(Xs), .(Ys))
U5_ag(Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(Xs))
U5_ga(N, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(Xs))

The set Q consists of the following terms:

select_in_aga(x0)
ll_in_ag(x0)
ll_in_ga(x0)
U6_aga(x0, x1)
U5_ag(x0, x1)
U5_ga(x0, x1)

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

(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:
t_in: (b)
ll_in: (b,f) (f,b)
select_in: (f,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(34) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g

(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:

T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))
T_IN_G(N) → LL_IN_GA(N, Xs)
LL_IN_GA(s(N), .(X, Xs)) → U5_GA(N, X, Xs, ll_in_ga(N, Xs))
LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)
U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U1_G(N, ll_out_ga(N, Xs)) → SELECT_IN_AGA(X1, Xs, Xs1)
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → U6_AGA(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → LL_IN_AG(M, Xs1)
LL_IN_AG(s(N), .(X, Xs)) → U5_AG(N, X, Xs, ll_in_ag(N, Xs))
LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)
U3_G(N, ll_out_ag(M, Xs1)) → U4_G(N, t_in_g(M))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U2_G(x1, x2)  =  U2_G(x2)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)
U6_AGA(x1, x2, x3, x4, x5)  =  U6_AGA(x5)
U3_G(x1, x2)  =  U3_G(x2)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)
U5_AG(x1, x2, x3, x4)  =  U5_AG(x4)
U4_G(x1, x2)  =  U4_G(x2)

We have to consider all (P,R,Pi)-chains

(36) Obligation:

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

T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))
T_IN_G(N) → LL_IN_GA(N, Xs)
LL_IN_GA(s(N), .(X, Xs)) → U5_GA(N, X, Xs, ll_in_ga(N, Xs))
LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)
U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U1_G(N, ll_out_ga(N, Xs)) → SELECT_IN_AGA(X1, Xs, Xs1)
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → U6_AGA(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → LL_IN_AG(M, Xs1)
LL_IN_AG(s(N), .(X, Xs)) → U5_AG(N, X, Xs, ll_in_ag(N, Xs))
LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)
U3_G(N, ll_out_ag(M, Xs1)) → U4_G(N, t_in_g(M))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)
U5_GA(x1, x2, x3, x4)  =  U5_GA(x4)
U2_G(x1, x2)  =  U2_G(x2)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)
U6_AGA(x1, x2, x3, x4, x5)  =  U6_AGA(x5)
U3_G(x1, x2)  =  U3_G(x2)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)
U5_AG(x1, x2, x3, x4)  =  U5_AG(x4)
U4_G(x1, x2)  =  U4_G(x2)

We have to consider all (P,R,Pi)-chains

(37) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 7 less nodes.

(38) Complex Obligation (AND)

(39) Obligation:

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

LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(40) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(41) Obligation:

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

LL_IN_AG(s(N), .(X, Xs)) → LL_IN_AG(N, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
LL_IN_AG(x1, x2)  =  LL_IN_AG(x2)

We have to consider all (P,R,Pi)-chains

(42) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(43) Obligation:

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

LL_IN_AG(.(Xs)) → LL_IN_AG(Xs)

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

(44) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • LL_IN_AG(.(Xs)) → LL_IN_AG(Xs)
    The graph contains the following edges 1 > 1

(45) TRUE

(46) Obligation:

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

SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

(47) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(48) Obligation:

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

SELECT_IN_AGA(X, .(Y, Xs), .(Y, Ys)) → SELECT_IN_AGA(X, Xs, Ys)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains

(49) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(50) Obligation:

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

SELECT_IN_AGA(.(Xs)) → SELECT_IN_AGA(Xs)

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

(51) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • SELECT_IN_AGA(.(Xs)) → SELECT_IN_AGA(Xs)
    The graph contains the following edges 1 > 1

(52) TRUE

(53) Obligation:

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

LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(54) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(55) Obligation:

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

LL_IN_GA(s(N), .(X, Xs)) → LL_IN_GA(N, Xs)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
.(x1, x2)  =  .(x2)
LL_IN_GA(x1, x2)  =  LL_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

(56) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(57) Obligation:

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

LL_IN_GA(s(N)) → LL_IN_GA(N)

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

(58) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] 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:

  • LL_IN_GA(s(N)) → LL_IN_GA(N)
    The graph contains the following edges 1 > 1

(59) TRUE

(60) Obligation:

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

U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)
T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))

The TRS R consists of the following rules:

t_in_g(N) → U1_g(N, ll_in_ga(N, Xs))
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))
U1_g(N, ll_out_ga(N, Xs)) → U2_g(N, select_in_aga(X1, Xs, Xs1))
select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U2_g(N, select_out_aga(X1, Xs, Xs1)) → U3_g(N, ll_in_ag(M, Xs1))
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U3_g(N, ll_out_ag(M, Xs1)) → U4_g(N, t_in_g(M))
t_in_g(0) → t_out_g(0)
U4_g(N, t_out_g(M)) → t_out_g(N)

The argument filtering Pi contains the following mapping:
t_in_g(x1)  =  t_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
U2_g(x1, x2)  =  U2_g(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
U3_g(x1, x2)  =  U3_g(x2)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
U4_g(x1, x2)  =  U4_g(x2)
t_out_g(x1)  =  t_out_g
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
U2_G(x1, x2)  =  U2_G(x2)
U3_G(x1, x2)  =  U3_G(x2)

We have to consider all (P,R,Pi)-chains

(61) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(62) Obligation:

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

U1_G(N, ll_out_ga(N, Xs)) → U2_G(N, select_in_aga(X1, Xs, Xs1))
U2_G(N, select_out_aga(X1, Xs, Xs1)) → U3_G(N, ll_in_ag(M, Xs1))
U3_G(N, ll_out_ag(M, Xs1)) → T_IN_G(M)
T_IN_G(N) → U1_G(N, ll_in_ga(N, Xs))

The TRS R consists of the following rules:

select_in_aga(X, .(Y, Xs), .(Y, Ys)) → U6_aga(X, Y, Xs, Ys, select_in_aga(X, Xs, Ys))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
ll_in_ag(s(N), .(X, Xs)) → U5_ag(N, X, Xs, ll_in_ag(N, Xs))
ll_in_ag(0, []) → ll_out_ag(0, [])
ll_in_ga(s(N), .(X, Xs)) → U5_ga(N, X, Xs, ll_in_ga(N, Xs))
ll_in_ga(0, []) → ll_out_ga(0, [])
U6_aga(X, Y, Xs, Ys, select_out_aga(X, Xs, Ys)) → select_out_aga(X, .(Y, Xs), .(Y, Ys))
U5_ag(N, X, Xs, ll_out_ag(N, Xs)) → ll_out_ag(s(N), .(X, Xs))
U5_ga(N, X, Xs, ll_out_ga(N, Xs)) → ll_out_ga(s(N), .(X, Xs))

The argument filtering Pi contains the following mapping:
ll_in_ga(x1, x2)  =  ll_in_ga(x1)
s(x1)  =  s(x1)
U5_ga(x1, x2, x3, x4)  =  U5_ga(x4)
0  =  0
ll_out_ga(x1, x2)  =  ll_out_ga(x2)
.(x1, x2)  =  .(x2)
select_in_aga(x1, x2, x3)  =  select_in_aga(x2)
U6_aga(x1, x2, x3, x4, x5)  =  U6_aga(x5)
select_out_aga(x1, x2, x3)  =  select_out_aga(x3)
ll_in_ag(x1, x2)  =  ll_in_ag(x2)
U5_ag(x1, x2, x3, x4)  =  U5_ag(x4)
[]  =  []
ll_out_ag(x1, x2)  =  ll_out_ag(x1)
T_IN_G(x1)  =  T_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
U2_G(x1, x2)  =  U2_G(x2)
U3_G(x1, x2)  =  U3_G(x2)

We have to consider all (P,R,Pi)-chains

(63) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(64) Obligation:

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

U1_G(ll_out_ga(Xs)) → U2_G(select_in_aga(Xs))
U2_G(select_out_aga(Xs1)) → U3_G(ll_in_ag(Xs1))
U3_G(ll_out_ag(M)) → T_IN_G(M)
T_IN_G(N) → U1_G(ll_in_ga(N))

The TRS R consists of the following rules:

select_in_aga(.(Xs)) → U6_aga(select_in_aga(Xs))
select_in_aga(.(Xs)) → select_out_aga(Xs)
ll_in_ag(.(Xs)) → U5_ag(ll_in_ag(Xs))
ll_in_ag([]) → ll_out_ag(0)
ll_in_ga(s(N)) → U5_ga(ll_in_ga(N))
ll_in_ga(0) → ll_out_ga([])
U6_aga(select_out_aga(Ys)) → select_out_aga(.(Ys))
U5_ag(ll_out_ag(N)) → ll_out_ag(s(N))
U5_ga(ll_out_ga(Xs)) → ll_out_ga(.(Xs))

The set Q consists of the following terms:

select_in_aga(x0)
ll_in_ag(x0)
ll_in_ga(x0)
U6_aga(x0)
U5_ag(x0)
U5_ga(x0)

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

(65) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U1_G(ll_out_ga(Xs)) → U2_G(select_in_aga(Xs))
U2_G(select_out_aga(Xs1)) → U3_G(ll_in_ag(Xs1))
U3_G(ll_out_ag(M)) → T_IN_G(M)
T_IN_G(N) → U1_G(ll_in_ga(N))

Strictly oriented rules of the TRS R:

select_in_aga(.(Xs)) → select_out_aga(Xs)
ll_in_ag([]) → ll_out_ag(0)
ll_in_ga(0) → ll_out_ga([])

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1)) = 7 + x1   
POL(0) = 2   
POL(T_IN_G(x1)) = 1 + x1   
POL(U1_G(x1)) = x1   
POL(U2_G(x1)) = x1   
POL(U3_G(x1)) = x1   
POL(U5_ag(x1)) = 7 + x1   
POL(U5_ga(x1)) = 7 + x1   
POL(U6_aga(x1)) = 7 + x1   
POL([]) = 0   
POL(ll_in_ag(x1)) = 5 + x1   
POL(ll_in_ga(x1)) = x1   
POL(ll_out_ag(x1)) = 2 + x1   
POL(ll_out_ga(x1)) = 1 + x1   
POL(s(x1)) = 7 + x1   
POL(select_in_aga(x1)) = x1   
POL(select_out_aga(x1)) = 6 + x1   

(66) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

select_in_aga(.(Xs)) → U6_aga(select_in_aga(Xs))
ll_in_ag(.(Xs)) → U5_ag(ll_in_ag(Xs))
ll_in_ga(s(N)) → U5_ga(ll_in_ga(N))
U6_aga(select_out_aga(Ys)) → select_out_aga(.(Ys))
U5_ag(ll_out_ag(N)) → ll_out_ag(s(N))
U5_ga(ll_out_ga(Xs)) → ll_out_ga(.(Xs))

The set Q consists of the following terms:

select_in_aga(x0)
ll_in_ag(x0)
ll_in_ga(x0)
U6_aga(x0)
U5_ag(x0)
U5_ga(x0)

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

(67) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(68) TRUE