(0) Obligation:
Clauses:
select(X, Y, Zs) :- ','(no(empty(Y)), ','(head(Y, X), tail(Y, Zs))).
select(X, Y, Z) :- ','(no(empty(Y)), ','(head(Y, H), ','(head(Z, H), ','(tail(Y, T), ','(tail(Z, Zs), select(X, T, Zs)))))).
head([], X1).
head(.(H, X2), H).
tail([], []).
tail(.(X3, T), T).
empty([]).
no(X) :- ','(X, ','(!, failure(a))).
no(X4).
failure(b).
Queries:
select(g,g,a).
(1) PrologToDTProblemTransformerProof (SOUND transformation)
Built DT problem from termination graph.
(2) Obligation:
Triples:
select63(T127, .(T160, T161)) :- select63(T127, T161).
select1(T51, .(T83, T84), []) :- select63(T51, T84).
select1(T51, .(T196, T185), .(T196, T198)) :- select1(T51, T185, T198).
Clauses:
selectc63(T120, .(T120, [])).
selectc63(T127, .(T160, T161)) :- selectc63(T127, T161).
selectc1(T41, .(T41, T42), T42).
selectc1(T51, .(T83, T84), []) :- selectc63(T51, T84).
selectc1(T51, .(T196, T185), .(T196, T198)) :- selectc1(T51, T185, T198).
Afs:
select1(x1, x2, x3) = select1(x1, x2)
(3) TriplesToPiDPProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
select1_in: (b,b,f)
select63_in: (b,b)
Transforming
TRIPLES into the following
Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:
SELECT1_IN_GGA(T51, .(T83, T84), []) → U2_GGA(T51, T83, T84, select63_in_gg(T51, T84))
SELECT1_IN_GGA(T51, .(T83, T84), []) → SELECT63_IN_GG(T51, T84)
SELECT63_IN_GG(T127, .(T160, T161)) → U1_GG(T127, T160, T161, select63_in_gg(T127, T161))
SELECT63_IN_GG(T127, .(T160, T161)) → SELECT63_IN_GG(T127, T161)
SELECT1_IN_GGA(T51, .(T196, T185), .(T196, T198)) → U3_GGA(T51, T196, T185, T198, select1_in_gga(T51, T185, T198))
SELECT1_IN_GGA(T51, .(T196, T185), .(T196, T198)) → SELECT1_IN_GGA(T51, T185, T198)
R is empty.
The argument filtering Pi contains the following mapping:
select1_in_gga(
x1,
x2,
x3) =
select1_in_gga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
select63_in_gg(
x1,
x2) =
select63_in_gg(
x1,
x2)
[] =
[]
SELECT1_IN_GGA(
x1,
x2,
x3) =
SELECT1_IN_GGA(
x1,
x2)
U2_GGA(
x1,
x2,
x3,
x4) =
U2_GGA(
x1,
x2,
x3,
x4)
SELECT63_IN_GG(
x1,
x2) =
SELECT63_IN_GG(
x1,
x2)
U1_GG(
x1,
x2,
x3,
x4) =
U1_GG(
x1,
x2,
x3,
x4)
U3_GGA(
x1,
x2,
x3,
x4,
x5) =
U3_GGA(
x1,
x2,
x3,
x5)
We have to consider all (P,R,Pi)-chains
Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES
(4) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
SELECT1_IN_GGA(T51, .(T83, T84), []) → U2_GGA(T51, T83, T84, select63_in_gg(T51, T84))
SELECT1_IN_GGA(T51, .(T83, T84), []) → SELECT63_IN_GG(T51, T84)
SELECT63_IN_GG(T127, .(T160, T161)) → U1_GG(T127, T160, T161, select63_in_gg(T127, T161))
SELECT63_IN_GG(T127, .(T160, T161)) → SELECT63_IN_GG(T127, T161)
SELECT1_IN_GGA(T51, .(T196, T185), .(T196, T198)) → U3_GGA(T51, T196, T185, T198, select1_in_gga(T51, T185, T198))
SELECT1_IN_GGA(T51, .(T196, T185), .(T196, T198)) → SELECT1_IN_GGA(T51, T185, T198)
R is empty.
The argument filtering Pi contains the following mapping:
select1_in_gga(
x1,
x2,
x3) =
select1_in_gga(
x1,
x2)
.(
x1,
x2) =
.(
x1,
x2)
select63_in_gg(
x1,
x2) =
select63_in_gg(
x1,
x2)
[] =
[]
SELECT1_IN_GGA(
x1,
x2,
x3) =
SELECT1_IN_GGA(
x1,
x2)
U2_GGA(
x1,
x2,
x3,
x4) =
U2_GGA(
x1,
x2,
x3,
x4)
SELECT63_IN_GG(
x1,
x2) =
SELECT63_IN_GG(
x1,
x2)
U1_GG(
x1,
x2,
x3,
x4) =
U1_GG(
x1,
x2,
x3,
x4)
U3_GGA(
x1,
x2,
x3,
x4,
x5) =
U3_GGA(
x1,
x2,
x3,
x5)
We have to consider all (P,R,Pi)-chains
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 4 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
SELECT63_IN_GG(T127, .(T160, T161)) → SELECT63_IN_GG(T127, T161)
R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
(8) PiDPToQDPProof (EQUIVALENT transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
SELECT63_IN_GG(T127, .(T160, T161)) → SELECT63_IN_GG(T127, T161)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(10) 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:
- SELECT63_IN_GG(T127, .(T160, T161)) → SELECT63_IN_GG(T127, T161)
The graph contains the following edges 1 >= 1, 2 > 2
(11) YES
(12) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
SELECT1_IN_GGA(T51, .(T196, T185), .(T196, T198)) → SELECT1_IN_GGA(T51, T185, T198)
R is empty.
The argument filtering Pi contains the following mapping:
.(
x1,
x2) =
.(
x1,
x2)
SELECT1_IN_GGA(
x1,
x2,
x3) =
SELECT1_IN_GGA(
x1,
x2)
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:
SELECT1_IN_GGA(T51, .(T196, T185)) → SELECT1_IN_GGA(T51, T185)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(15) 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:
- SELECT1_IN_GGA(T51, .(T196, T185)) → SELECT1_IN_GGA(T51, T185)
The graph contains the following edges 1 >= 1, 2 > 2
(16) YES