(0) Obligation:

Clauses:

list([]).
list(.(X, XS)) :- list(XS).
s2l(s(X), .(Y, Xs)) :- s2l(X, Xs).
s2l(0, []).
goal(X) :- ','(s2l(X, XS), list(XS)).

Query: goal(g)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

goalA_in_g(s(T8)) → U1_g(T8, pB_in_gaa(T8, X28, X27))
pB_in_gaa(T8, T10, X27) → U5_gaa(T8, T10, X27, s2lC_in_ga(T8, T10))
s2lC_in_ga(s(T16), .(X62, X63)) → U2_ga(T16, X62, X63, s2lC_in_ga(T16, X63))
s2lC_in_ga(0, []) → s2lC_out_ga(0, [])
U2_ga(T16, X62, X63, s2lC_out_ga(T16, X63)) → s2lC_out_ga(s(T16), .(X62, X63))
U5_gaa(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_gaa(T8, T10, X27, listE_in_ag(X27, T10))
listE_in_ag(X77, T22) → U4_ag(X77, T22, listD_in_g(T22))
listD_in_g([]) → listD_out_g([])
listD_in_g(.(T27, T29)) → U3_g(T27, T29, listD_in_g(T29))
U3_g(T27, T29, listD_out_g(T29)) → listD_out_g(.(T27, T29))
U4_ag(X77, T22, listD_out_g(T22)) → listE_out_ag(X77, T22)
U6_gaa(T8, T10, X27, listE_out_ag(X27, T10)) → pB_out_gaa(T8, T10, X27)
U1_g(T8, pB_out_gaa(T8, X28, X27)) → goalA_out_g(s(T8))
goalA_in_g(0) → goalA_out_g(0)

The argument filtering Pi contains the following mapping:
goalA_in_g(x1)  =  goalA_in_g(x1)
s(x1)  =  s(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U5_gaa(x1, x2, x3, x4)  =  U5_gaa(x1, x4)
s2lC_in_ga(x1, x2)  =  s2lC_in_ga(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
0  =  0
s2lC_out_ga(x1, x2)  =  s2lC_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U6_gaa(x1, x2, x3, x4)  =  U6_gaa(x1, x2, x4)
listE_in_ag(x1, x2)  =  listE_in_ag(x2)
U4_ag(x1, x2, x3)  =  U4_ag(x2, x3)
listD_in_g(x1)  =  listD_in_g(x1)
[]  =  []
listD_out_g(x1)  =  listD_out_g(x1)
U3_g(x1, x2, x3)  =  U3_g(x2, x3)
listE_out_ag(x1, x2)  =  listE_out_ag(x2)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
goalA_out_g(x1)  =  goalA_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:

GOALA_IN_G(s(T8)) → U1_G(T8, pB_in_gaa(T8, X28, X27))
GOALA_IN_G(s(T8)) → PB_IN_GAA(T8, X28, X27)
PB_IN_GAA(T8, T10, X27) → U5_GAA(T8, T10, X27, s2lC_in_ga(T8, T10))
PB_IN_GAA(T8, T10, X27) → S2LC_IN_GA(T8, T10)
S2LC_IN_GA(s(T16), .(X62, X63)) → U2_GA(T16, X62, X63, s2lC_in_ga(T16, X63))
S2LC_IN_GA(s(T16), .(X62, X63)) → S2LC_IN_GA(T16, X63)
U5_GAA(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_GAA(T8, T10, X27, listE_in_ag(X27, T10))
U5_GAA(T8, T10, X27, s2lC_out_ga(T8, T10)) → LISTE_IN_AG(X27, T10)
LISTE_IN_AG(X77, T22) → U4_AG(X77, T22, listD_in_g(T22))
LISTE_IN_AG(X77, T22) → LISTD_IN_G(T22)
LISTD_IN_G(.(T27, T29)) → U3_G(T27, T29, listD_in_g(T29))
LISTD_IN_G(.(T27, T29)) → LISTD_IN_G(T29)

The TRS R consists of the following rules:

goalA_in_g(s(T8)) → U1_g(T8, pB_in_gaa(T8, X28, X27))
pB_in_gaa(T8, T10, X27) → U5_gaa(T8, T10, X27, s2lC_in_ga(T8, T10))
s2lC_in_ga(s(T16), .(X62, X63)) → U2_ga(T16, X62, X63, s2lC_in_ga(T16, X63))
s2lC_in_ga(0, []) → s2lC_out_ga(0, [])
U2_ga(T16, X62, X63, s2lC_out_ga(T16, X63)) → s2lC_out_ga(s(T16), .(X62, X63))
U5_gaa(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_gaa(T8, T10, X27, listE_in_ag(X27, T10))
listE_in_ag(X77, T22) → U4_ag(X77, T22, listD_in_g(T22))
listD_in_g([]) → listD_out_g([])
listD_in_g(.(T27, T29)) → U3_g(T27, T29, listD_in_g(T29))
U3_g(T27, T29, listD_out_g(T29)) → listD_out_g(.(T27, T29))
U4_ag(X77, T22, listD_out_g(T22)) → listE_out_ag(X77, T22)
U6_gaa(T8, T10, X27, listE_out_ag(X27, T10)) → pB_out_gaa(T8, T10, X27)
U1_g(T8, pB_out_gaa(T8, X28, X27)) → goalA_out_g(s(T8))
goalA_in_g(0) → goalA_out_g(0)

The argument filtering Pi contains the following mapping:
goalA_in_g(x1)  =  goalA_in_g(x1)
s(x1)  =  s(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U5_gaa(x1, x2, x3, x4)  =  U5_gaa(x1, x4)
s2lC_in_ga(x1, x2)  =  s2lC_in_ga(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
0  =  0
s2lC_out_ga(x1, x2)  =  s2lC_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U6_gaa(x1, x2, x3, x4)  =  U6_gaa(x1, x2, x4)
listE_in_ag(x1, x2)  =  listE_in_ag(x2)
U4_ag(x1, x2, x3)  =  U4_ag(x2, x3)
listD_in_g(x1)  =  listD_in_g(x1)
[]  =  []
listD_out_g(x1)  =  listD_out_g(x1)
U3_g(x1, x2, x3)  =  U3_g(x2, x3)
listE_out_ag(x1, x2)  =  listE_out_ag(x2)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
goalA_out_g(x1)  =  goalA_out_g(x1)
GOALA_IN_G(x1)  =  GOALA_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
PB_IN_GAA(x1, x2, x3)  =  PB_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4)  =  U5_GAA(x1, x4)
S2LC_IN_GA(x1, x2)  =  S2LC_IN_GA(x1)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U6_GAA(x1, x2, x3, x4)  =  U6_GAA(x1, x2, x4)
LISTE_IN_AG(x1, x2)  =  LISTE_IN_AG(x2)
U4_AG(x1, x2, x3)  =  U4_AG(x2, x3)
LISTD_IN_G(x1)  =  LISTD_IN_G(x1)
U3_G(x1, x2, x3)  =  U3_G(x2, x3)

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

(4) Obligation:

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

GOALA_IN_G(s(T8)) → U1_G(T8, pB_in_gaa(T8, X28, X27))
GOALA_IN_G(s(T8)) → PB_IN_GAA(T8, X28, X27)
PB_IN_GAA(T8, T10, X27) → U5_GAA(T8, T10, X27, s2lC_in_ga(T8, T10))
PB_IN_GAA(T8, T10, X27) → S2LC_IN_GA(T8, T10)
S2LC_IN_GA(s(T16), .(X62, X63)) → U2_GA(T16, X62, X63, s2lC_in_ga(T16, X63))
S2LC_IN_GA(s(T16), .(X62, X63)) → S2LC_IN_GA(T16, X63)
U5_GAA(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_GAA(T8, T10, X27, listE_in_ag(X27, T10))
U5_GAA(T8, T10, X27, s2lC_out_ga(T8, T10)) → LISTE_IN_AG(X27, T10)
LISTE_IN_AG(X77, T22) → U4_AG(X77, T22, listD_in_g(T22))
LISTE_IN_AG(X77, T22) → LISTD_IN_G(T22)
LISTD_IN_G(.(T27, T29)) → U3_G(T27, T29, listD_in_g(T29))
LISTD_IN_G(.(T27, T29)) → LISTD_IN_G(T29)

The TRS R consists of the following rules:

goalA_in_g(s(T8)) → U1_g(T8, pB_in_gaa(T8, X28, X27))
pB_in_gaa(T8, T10, X27) → U5_gaa(T8, T10, X27, s2lC_in_ga(T8, T10))
s2lC_in_ga(s(T16), .(X62, X63)) → U2_ga(T16, X62, X63, s2lC_in_ga(T16, X63))
s2lC_in_ga(0, []) → s2lC_out_ga(0, [])
U2_ga(T16, X62, X63, s2lC_out_ga(T16, X63)) → s2lC_out_ga(s(T16), .(X62, X63))
U5_gaa(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_gaa(T8, T10, X27, listE_in_ag(X27, T10))
listE_in_ag(X77, T22) → U4_ag(X77, T22, listD_in_g(T22))
listD_in_g([]) → listD_out_g([])
listD_in_g(.(T27, T29)) → U3_g(T27, T29, listD_in_g(T29))
U3_g(T27, T29, listD_out_g(T29)) → listD_out_g(.(T27, T29))
U4_ag(X77, T22, listD_out_g(T22)) → listE_out_ag(X77, T22)
U6_gaa(T8, T10, X27, listE_out_ag(X27, T10)) → pB_out_gaa(T8, T10, X27)
U1_g(T8, pB_out_gaa(T8, X28, X27)) → goalA_out_g(s(T8))
goalA_in_g(0) → goalA_out_g(0)

The argument filtering Pi contains the following mapping:
goalA_in_g(x1)  =  goalA_in_g(x1)
s(x1)  =  s(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U5_gaa(x1, x2, x3, x4)  =  U5_gaa(x1, x4)
s2lC_in_ga(x1, x2)  =  s2lC_in_ga(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
0  =  0
s2lC_out_ga(x1, x2)  =  s2lC_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U6_gaa(x1, x2, x3, x4)  =  U6_gaa(x1, x2, x4)
listE_in_ag(x1, x2)  =  listE_in_ag(x2)
U4_ag(x1, x2, x3)  =  U4_ag(x2, x3)
listD_in_g(x1)  =  listD_in_g(x1)
[]  =  []
listD_out_g(x1)  =  listD_out_g(x1)
U3_g(x1, x2, x3)  =  U3_g(x2, x3)
listE_out_ag(x1, x2)  =  listE_out_ag(x2)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
goalA_out_g(x1)  =  goalA_out_g(x1)
GOALA_IN_G(x1)  =  GOALA_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x1, x2)
PB_IN_GAA(x1, x2, x3)  =  PB_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4)  =  U5_GAA(x1, x4)
S2LC_IN_GA(x1, x2)  =  S2LC_IN_GA(x1)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x1, x4)
U6_GAA(x1, x2, x3, x4)  =  U6_GAA(x1, x2, x4)
LISTE_IN_AG(x1, x2)  =  LISTE_IN_AG(x2)
U4_AG(x1, x2, x3)  =  U4_AG(x2, x3)
LISTD_IN_G(x1)  =  LISTD_IN_G(x1)
U3_G(x1, x2, x3)  =  U3_G(x2, x3)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 10 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

LISTD_IN_G(.(T27, T29)) → LISTD_IN_G(T29)

The TRS R consists of the following rules:

goalA_in_g(s(T8)) → U1_g(T8, pB_in_gaa(T8, X28, X27))
pB_in_gaa(T8, T10, X27) → U5_gaa(T8, T10, X27, s2lC_in_ga(T8, T10))
s2lC_in_ga(s(T16), .(X62, X63)) → U2_ga(T16, X62, X63, s2lC_in_ga(T16, X63))
s2lC_in_ga(0, []) → s2lC_out_ga(0, [])
U2_ga(T16, X62, X63, s2lC_out_ga(T16, X63)) → s2lC_out_ga(s(T16), .(X62, X63))
U5_gaa(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_gaa(T8, T10, X27, listE_in_ag(X27, T10))
listE_in_ag(X77, T22) → U4_ag(X77, T22, listD_in_g(T22))
listD_in_g([]) → listD_out_g([])
listD_in_g(.(T27, T29)) → U3_g(T27, T29, listD_in_g(T29))
U3_g(T27, T29, listD_out_g(T29)) → listD_out_g(.(T27, T29))
U4_ag(X77, T22, listD_out_g(T22)) → listE_out_ag(X77, T22)
U6_gaa(T8, T10, X27, listE_out_ag(X27, T10)) → pB_out_gaa(T8, T10, X27)
U1_g(T8, pB_out_gaa(T8, X28, X27)) → goalA_out_g(s(T8))
goalA_in_g(0) → goalA_out_g(0)

The argument filtering Pi contains the following mapping:
goalA_in_g(x1)  =  goalA_in_g(x1)
s(x1)  =  s(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U5_gaa(x1, x2, x3, x4)  =  U5_gaa(x1, x4)
s2lC_in_ga(x1, x2)  =  s2lC_in_ga(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
0  =  0
s2lC_out_ga(x1, x2)  =  s2lC_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U6_gaa(x1, x2, x3, x4)  =  U6_gaa(x1, x2, x4)
listE_in_ag(x1, x2)  =  listE_in_ag(x2)
U4_ag(x1, x2, x3)  =  U4_ag(x2, x3)
listD_in_g(x1)  =  listD_in_g(x1)
[]  =  []
listD_out_g(x1)  =  listD_out_g(x1)
U3_g(x1, x2, x3)  =  U3_g(x2, x3)
listE_out_ag(x1, x2)  =  listE_out_ag(x2)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
goalA_out_g(x1)  =  goalA_out_g(x1)
LISTD_IN_G(x1)  =  LISTD_IN_G(x1)

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:

LISTD_IN_G(.(T27, T29)) → LISTD_IN_G(T29)

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

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:

LISTD_IN_G(.(T29)) → LISTD_IN_G(T29)

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:

  • LISTD_IN_G(.(T29)) → LISTD_IN_G(T29)
    The graph contains the following edges 1 > 1

(13) YES

(14) Obligation:

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

S2LC_IN_GA(s(T16), .(X62, X63)) → S2LC_IN_GA(T16, X63)

The TRS R consists of the following rules:

goalA_in_g(s(T8)) → U1_g(T8, pB_in_gaa(T8, X28, X27))
pB_in_gaa(T8, T10, X27) → U5_gaa(T8, T10, X27, s2lC_in_ga(T8, T10))
s2lC_in_ga(s(T16), .(X62, X63)) → U2_ga(T16, X62, X63, s2lC_in_ga(T16, X63))
s2lC_in_ga(0, []) → s2lC_out_ga(0, [])
U2_ga(T16, X62, X63, s2lC_out_ga(T16, X63)) → s2lC_out_ga(s(T16), .(X62, X63))
U5_gaa(T8, T10, X27, s2lC_out_ga(T8, T10)) → U6_gaa(T8, T10, X27, listE_in_ag(X27, T10))
listE_in_ag(X77, T22) → U4_ag(X77, T22, listD_in_g(T22))
listD_in_g([]) → listD_out_g([])
listD_in_g(.(T27, T29)) → U3_g(T27, T29, listD_in_g(T29))
U3_g(T27, T29, listD_out_g(T29)) → listD_out_g(.(T27, T29))
U4_ag(X77, T22, listD_out_g(T22)) → listE_out_ag(X77, T22)
U6_gaa(T8, T10, X27, listE_out_ag(X27, T10)) → pB_out_gaa(T8, T10, X27)
U1_g(T8, pB_out_gaa(T8, X28, X27)) → goalA_out_g(s(T8))
goalA_in_g(0) → goalA_out_g(0)

The argument filtering Pi contains the following mapping:
goalA_in_g(x1)  =  goalA_in_g(x1)
s(x1)  =  s(x1)
U1_g(x1, x2)  =  U1_g(x1, x2)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U5_gaa(x1, x2, x3, x4)  =  U5_gaa(x1, x4)
s2lC_in_ga(x1, x2)  =  s2lC_in_ga(x1)
U2_ga(x1, x2, x3, x4)  =  U2_ga(x1, x4)
0  =  0
s2lC_out_ga(x1, x2)  =  s2lC_out_ga(x1, x2)
.(x1, x2)  =  .(x2)
U6_gaa(x1, x2, x3, x4)  =  U6_gaa(x1, x2, x4)
listE_in_ag(x1, x2)  =  listE_in_ag(x2)
U4_ag(x1, x2, x3)  =  U4_ag(x2, x3)
listD_in_g(x1)  =  listD_in_g(x1)
[]  =  []
listD_out_g(x1)  =  listD_out_g(x1)
U3_g(x1, x2, x3)  =  U3_g(x2, x3)
listE_out_ag(x1, x2)  =  listE_out_ag(x2)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
goalA_out_g(x1)  =  goalA_out_g(x1)
S2LC_IN_GA(x1, x2)  =  S2LC_IN_GA(x1)

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:

S2LC_IN_GA(s(T16), .(X62, X63)) → S2LC_IN_GA(T16, X63)

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

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:

S2LC_IN_GA(s(T16)) → S2LC_IN_GA(T16)

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:

  • S2LC_IN_GA(s(T16)) → S2LC_IN_GA(T16)
    The graph contains the following edges 1 > 1

(20) YES