(0) Obligation:

Clauses:

sublist(Xs, Ys) :- ','(app(X1, Zs, Ys), app(Xs, X2, Zs)).
app([], X, X).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).

Query: sublist(a,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:

sublistA_in_ag(T7, T6) → U1_ag(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
pB_in_aagaa([], T16, T16, T7, X9) → U3_aagaa(T16, T7, X9, appC_in_aag(T7, X9, T16))
appC_in_aag([], T23, T23) → appC_out_aag([], T23, T23)
appC_in_aag(.(T30, T33), X56, .(T30, T32)) → U2_aag(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
U2_aag(T30, T33, X56, T32, appC_out_aag(T33, X56, T32)) → appC_out_aag(.(T30, T33), X56, .(T30, T32))
U3_aagaa(T16, T7, X9, appC_out_aag(T7, X9, T16)) → pB_out_aagaa([], T16, T16, T7, X9)
pB_in_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_aagaa(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
U4_aagaa(T40, X80, X81, T41, T7, X9, pB_out_aagaa(X80, X81, T41, T7, X9)) → pB_out_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9)
U1_ag(T7, T6, pB_out_aagaa(X7, X8, T6, T7, X9)) → sublistA_out_ag(T7, T6)

The argument filtering Pi contains the following mapping:
sublistA_in_ag(x1, x2)  =  sublistA_in_ag(x2)
U1_ag(x1, x2, x3)  =  U1_ag(x2, x3)
pB_in_aagaa(x1, x2, x3, x4, x5)  =  pB_in_aagaa(x3)
U3_aagaa(x1, x2, x3, x4)  =  U3_aagaa(x1, x4)
appC_in_aag(x1, x2, x3)  =  appC_in_aag(x3)
appC_out_aag(x1, x2, x3)  =  appC_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U2_aag(x1, x2, x3, x4, x5)  =  U2_aag(x1, x4, x5)
pB_out_aagaa(x1, x2, x3, x4, x5)  =  pB_out_aagaa(x1, x2, x3, x4, x5)
U4_aagaa(x1, x2, x3, x4, x5, x6, x7)  =  U4_aagaa(x1, x4, x7)
sublistA_out_ag(x1, x2)  =  sublistA_out_ag(x1, x2)
[]  =  []

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

SUBLISTA_IN_AG(T7, T6) → U1_AG(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
SUBLISTA_IN_AG(T7, T6) → PB_IN_AAGAA(X7, X8, T6, T7, X9)
PB_IN_AAGAA([], T16, T16, T7, X9) → U3_AAGAA(T16, T7, X9, appC_in_aag(T7, X9, T16))
PB_IN_AAGAA([], T16, T16, T7, X9) → APPC_IN_AAG(T7, X9, T16)
APPC_IN_AAG(.(T30, T33), X56, .(T30, T32)) → U2_AAG(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
APPC_IN_AAG(.(T30, T33), X56, .(T30, T32)) → APPC_IN_AAG(T33, X56, T32)
PB_IN_AAGAA(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_AAGAA(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
PB_IN_AAGAA(.(T40, X80), X81, .(T40, T41), T7, X9) → PB_IN_AAGAA(X80, X81, T41, T7, X9)

The TRS R consists of the following rules:

sublistA_in_ag(T7, T6) → U1_ag(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
pB_in_aagaa([], T16, T16, T7, X9) → U3_aagaa(T16, T7, X9, appC_in_aag(T7, X9, T16))
appC_in_aag([], T23, T23) → appC_out_aag([], T23, T23)
appC_in_aag(.(T30, T33), X56, .(T30, T32)) → U2_aag(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
U2_aag(T30, T33, X56, T32, appC_out_aag(T33, X56, T32)) → appC_out_aag(.(T30, T33), X56, .(T30, T32))
U3_aagaa(T16, T7, X9, appC_out_aag(T7, X9, T16)) → pB_out_aagaa([], T16, T16, T7, X9)
pB_in_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_aagaa(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
U4_aagaa(T40, X80, X81, T41, T7, X9, pB_out_aagaa(X80, X81, T41, T7, X9)) → pB_out_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9)
U1_ag(T7, T6, pB_out_aagaa(X7, X8, T6, T7, X9)) → sublistA_out_ag(T7, T6)

The argument filtering Pi contains the following mapping:
sublistA_in_ag(x1, x2)  =  sublistA_in_ag(x2)
U1_ag(x1, x2, x3)  =  U1_ag(x2, x3)
pB_in_aagaa(x1, x2, x3, x4, x5)  =  pB_in_aagaa(x3)
U3_aagaa(x1, x2, x3, x4)  =  U3_aagaa(x1, x4)
appC_in_aag(x1, x2, x3)  =  appC_in_aag(x3)
appC_out_aag(x1, x2, x3)  =  appC_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U2_aag(x1, x2, x3, x4, x5)  =  U2_aag(x1, x4, x5)
pB_out_aagaa(x1, x2, x3, x4, x5)  =  pB_out_aagaa(x1, x2, x3, x4, x5)
U4_aagaa(x1, x2, x3, x4, x5, x6, x7)  =  U4_aagaa(x1, x4, x7)
sublistA_out_ag(x1, x2)  =  sublistA_out_ag(x1, x2)
[]  =  []
SUBLISTA_IN_AG(x1, x2)  =  SUBLISTA_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x2, x3)
PB_IN_AAGAA(x1, x2, x3, x4, x5)  =  PB_IN_AAGAA(x3)
U3_AAGAA(x1, x2, x3, x4)  =  U3_AAGAA(x1, x4)
APPC_IN_AAG(x1, x2, x3)  =  APPC_IN_AAG(x3)
U2_AAG(x1, x2, x3, x4, x5)  =  U2_AAG(x1, x4, x5)
U4_AAGAA(x1, x2, x3, x4, x5, x6, x7)  =  U4_AAGAA(x1, x4, x7)

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

(4) Obligation:

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

SUBLISTA_IN_AG(T7, T6) → U1_AG(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
SUBLISTA_IN_AG(T7, T6) → PB_IN_AAGAA(X7, X8, T6, T7, X9)
PB_IN_AAGAA([], T16, T16, T7, X9) → U3_AAGAA(T16, T7, X9, appC_in_aag(T7, X9, T16))
PB_IN_AAGAA([], T16, T16, T7, X9) → APPC_IN_AAG(T7, X9, T16)
APPC_IN_AAG(.(T30, T33), X56, .(T30, T32)) → U2_AAG(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
APPC_IN_AAG(.(T30, T33), X56, .(T30, T32)) → APPC_IN_AAG(T33, X56, T32)
PB_IN_AAGAA(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_AAGAA(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
PB_IN_AAGAA(.(T40, X80), X81, .(T40, T41), T7, X9) → PB_IN_AAGAA(X80, X81, T41, T7, X9)

The TRS R consists of the following rules:

sublistA_in_ag(T7, T6) → U1_ag(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
pB_in_aagaa([], T16, T16, T7, X9) → U3_aagaa(T16, T7, X9, appC_in_aag(T7, X9, T16))
appC_in_aag([], T23, T23) → appC_out_aag([], T23, T23)
appC_in_aag(.(T30, T33), X56, .(T30, T32)) → U2_aag(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
U2_aag(T30, T33, X56, T32, appC_out_aag(T33, X56, T32)) → appC_out_aag(.(T30, T33), X56, .(T30, T32))
U3_aagaa(T16, T7, X9, appC_out_aag(T7, X9, T16)) → pB_out_aagaa([], T16, T16, T7, X9)
pB_in_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_aagaa(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
U4_aagaa(T40, X80, X81, T41, T7, X9, pB_out_aagaa(X80, X81, T41, T7, X9)) → pB_out_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9)
U1_ag(T7, T6, pB_out_aagaa(X7, X8, T6, T7, X9)) → sublistA_out_ag(T7, T6)

The argument filtering Pi contains the following mapping:
sublistA_in_ag(x1, x2)  =  sublistA_in_ag(x2)
U1_ag(x1, x2, x3)  =  U1_ag(x2, x3)
pB_in_aagaa(x1, x2, x3, x4, x5)  =  pB_in_aagaa(x3)
U3_aagaa(x1, x2, x3, x4)  =  U3_aagaa(x1, x4)
appC_in_aag(x1, x2, x3)  =  appC_in_aag(x3)
appC_out_aag(x1, x2, x3)  =  appC_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U2_aag(x1, x2, x3, x4, x5)  =  U2_aag(x1, x4, x5)
pB_out_aagaa(x1, x2, x3, x4, x5)  =  pB_out_aagaa(x1, x2, x3, x4, x5)
U4_aagaa(x1, x2, x3, x4, x5, x6, x7)  =  U4_aagaa(x1, x4, x7)
sublistA_out_ag(x1, x2)  =  sublistA_out_ag(x1, x2)
[]  =  []
SUBLISTA_IN_AG(x1, x2)  =  SUBLISTA_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x2, x3)
PB_IN_AAGAA(x1, x2, x3, x4, x5)  =  PB_IN_AAGAA(x3)
U3_AAGAA(x1, x2, x3, x4)  =  U3_AAGAA(x1, x4)
APPC_IN_AAG(x1, x2, x3)  =  APPC_IN_AAG(x3)
U2_AAG(x1, x2, x3, x4, x5)  =  U2_AAG(x1, x4, x5)
U4_AAGAA(x1, x2, x3, x4, x5, x6, x7)  =  U4_AAGAA(x1, x4, x7)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

APPC_IN_AAG(.(T30, T33), X56, .(T30, T32)) → APPC_IN_AAG(T33, X56, T32)

The TRS R consists of the following rules:

sublistA_in_ag(T7, T6) → U1_ag(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
pB_in_aagaa([], T16, T16, T7, X9) → U3_aagaa(T16, T7, X9, appC_in_aag(T7, X9, T16))
appC_in_aag([], T23, T23) → appC_out_aag([], T23, T23)
appC_in_aag(.(T30, T33), X56, .(T30, T32)) → U2_aag(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
U2_aag(T30, T33, X56, T32, appC_out_aag(T33, X56, T32)) → appC_out_aag(.(T30, T33), X56, .(T30, T32))
U3_aagaa(T16, T7, X9, appC_out_aag(T7, X9, T16)) → pB_out_aagaa([], T16, T16, T7, X9)
pB_in_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_aagaa(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
U4_aagaa(T40, X80, X81, T41, T7, X9, pB_out_aagaa(X80, X81, T41, T7, X9)) → pB_out_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9)
U1_ag(T7, T6, pB_out_aagaa(X7, X8, T6, T7, X9)) → sublistA_out_ag(T7, T6)

The argument filtering Pi contains the following mapping:
sublistA_in_ag(x1, x2)  =  sublistA_in_ag(x2)
U1_ag(x1, x2, x3)  =  U1_ag(x2, x3)
pB_in_aagaa(x1, x2, x3, x4, x5)  =  pB_in_aagaa(x3)
U3_aagaa(x1, x2, x3, x4)  =  U3_aagaa(x1, x4)
appC_in_aag(x1, x2, x3)  =  appC_in_aag(x3)
appC_out_aag(x1, x2, x3)  =  appC_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U2_aag(x1, x2, x3, x4, x5)  =  U2_aag(x1, x4, x5)
pB_out_aagaa(x1, x2, x3, x4, x5)  =  pB_out_aagaa(x1, x2, x3, x4, x5)
U4_aagaa(x1, x2, x3, x4, x5, x6, x7)  =  U4_aagaa(x1, x4, x7)
sublistA_out_ag(x1, x2)  =  sublistA_out_ag(x1, x2)
[]  =  []
APPC_IN_AAG(x1, x2, x3)  =  APPC_IN_AAG(x3)

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:

APPC_IN_AAG(.(T30, T33), X56, .(T30, T32)) → APPC_IN_AAG(T33, X56, T32)

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

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:

APPC_IN_AAG(.(T30, T32)) → APPC_IN_AAG(T32)

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:

  • APPC_IN_AAG(.(T30, T32)) → APPC_IN_AAG(T32)
    The graph contains the following edges 1 > 1

(13) YES

(14) Obligation:

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

PB_IN_AAGAA(.(T40, X80), X81, .(T40, T41), T7, X9) → PB_IN_AAGAA(X80, X81, T41, T7, X9)

The TRS R consists of the following rules:

sublistA_in_ag(T7, T6) → U1_ag(T7, T6, pB_in_aagaa(X7, X8, T6, T7, X9))
pB_in_aagaa([], T16, T16, T7, X9) → U3_aagaa(T16, T7, X9, appC_in_aag(T7, X9, T16))
appC_in_aag([], T23, T23) → appC_out_aag([], T23, T23)
appC_in_aag(.(T30, T33), X56, .(T30, T32)) → U2_aag(T30, T33, X56, T32, appC_in_aag(T33, X56, T32))
U2_aag(T30, T33, X56, T32, appC_out_aag(T33, X56, T32)) → appC_out_aag(.(T30, T33), X56, .(T30, T32))
U3_aagaa(T16, T7, X9, appC_out_aag(T7, X9, T16)) → pB_out_aagaa([], T16, T16, T7, X9)
pB_in_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9) → U4_aagaa(T40, X80, X81, T41, T7, X9, pB_in_aagaa(X80, X81, T41, T7, X9))
U4_aagaa(T40, X80, X81, T41, T7, X9, pB_out_aagaa(X80, X81, T41, T7, X9)) → pB_out_aagaa(.(T40, X80), X81, .(T40, T41), T7, X9)
U1_ag(T7, T6, pB_out_aagaa(X7, X8, T6, T7, X9)) → sublistA_out_ag(T7, T6)

The argument filtering Pi contains the following mapping:
sublistA_in_ag(x1, x2)  =  sublistA_in_ag(x2)
U1_ag(x1, x2, x3)  =  U1_ag(x2, x3)
pB_in_aagaa(x1, x2, x3, x4, x5)  =  pB_in_aagaa(x3)
U3_aagaa(x1, x2, x3, x4)  =  U3_aagaa(x1, x4)
appC_in_aag(x1, x2, x3)  =  appC_in_aag(x3)
appC_out_aag(x1, x2, x3)  =  appC_out_aag(x1, x2, x3)
.(x1, x2)  =  .(x1, x2)
U2_aag(x1, x2, x3, x4, x5)  =  U2_aag(x1, x4, x5)
pB_out_aagaa(x1, x2, x3, x4, x5)  =  pB_out_aagaa(x1, x2, x3, x4, x5)
U4_aagaa(x1, x2, x3, x4, x5, x6, x7)  =  U4_aagaa(x1, x4, x7)
sublistA_out_ag(x1, x2)  =  sublistA_out_ag(x1, x2)
[]  =  []
PB_IN_AAGAA(x1, x2, x3, x4, x5)  =  PB_IN_AAGAA(x3)

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:

PB_IN_AAGAA(.(T40, X80), X81, .(T40, T41), T7, X9) → PB_IN_AAGAA(X80, X81, T41, T7, X9)

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

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:

PB_IN_AAGAA(.(T40, T41)) → PB_IN_AAGAA(T41)

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:

  • PB_IN_AAGAA(.(T40, T41)) → PB_IN_AAGAA(T41)
    The graph contains the following edges 1 > 1

(20) YES