(0) Obligation:

Clauses:

star(X1, []).
star(.(X, U), .(X, W)) :- ','(app(U, V, W), star(.(X, U), W)).
app([], L, L).
app(.(X, L), M, .(X, N)) :- app(L, M, N).

Query: star(g,g)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f1_in(T7, []) → f1_out1
f1_in(.(T14, T15), .(T14, T16)) → U1(f20_in(T15, T16, T14), .(T14, T15), .(T14, T16))
U1(f20_out1(X17), .(T14, T15), .(T14, T16)) → f1_out1
f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)
f20_in(T15, T16, T14) → U3(f36_in(T15, T16), T15, T16, T14)
U3(f36_out1(T19), T15, T16, T14) → U4(f1_in(.(T14, T15), T16), T15, T16, T14, T19)
U4(f1_out1, T15, T16, T14, T19) → f20_out1(T19)

Q is empty.

(3) Overlay + Local Confluence (EQUIVALENT transformation)

The TRS is overlay and locally confluent. By [NOC] we can switch to innermost.

(4) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f1_in(T7, []) → f1_out1
f1_in(.(T14, T15), .(T14, T16)) → U1(f20_in(T15, T16, T14), .(T14, T15), .(T14, T16))
U1(f20_out1(X17), .(T14, T15), .(T14, T16)) → f1_out1
f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)
f20_in(T15, T16, T14) → U3(f36_in(T15, T16), T15, T16, T14)
U3(f36_out1(T19), T15, T16, T14) → U4(f1_in(.(T14, T15), T16), T15, T16, T14, T19)
U4(f1_out1, T15, T16, T14, T19) → f20_out1(T19)

The set Q consists of the following terms:

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(6) Obligation:

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

F1_IN(.(T14, T15), .(T14, T16)) → U11(f20_in(T15, T16, T14), .(T14, T15), .(T14, T16))
F1_IN(.(T14, T15), .(T14, T16)) → F20_IN(T15, T16, T14)
F36_IN(.(T33, T34), .(T33, T35)) → U21(f36_in(T34, T35), .(T33, T34), .(T33, T35))
F36_IN(.(T33, T34), .(T33, T35)) → F36_IN(T34, T35)
F20_IN(T15, T16, T14) → U31(f36_in(T15, T16), T15, T16, T14)
F20_IN(T15, T16, T14) → F36_IN(T15, T16)
U31(f36_out1(T19), T15, T16, T14) → U41(f1_in(.(T14, T15), T16), T15, T16, T14, T19)
U31(f36_out1(T19), T15, T16, T14) → F1_IN(.(T14, T15), T16)

The TRS R consists of the following rules:

f1_in(T7, []) → f1_out1
f1_in(.(T14, T15), .(T14, T16)) → U1(f20_in(T15, T16, T14), .(T14, T15), .(T14, T16))
U1(f20_out1(X17), .(T14, T15), .(T14, T16)) → f1_out1
f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)
f20_in(T15, T16, T14) → U3(f36_in(T15, T16), T15, T16, T14)
U3(f36_out1(T19), T15, T16, T14) → U4(f1_in(.(T14, T15), T16), T15, T16, T14, T19)
U4(f1_out1, T15, T16, T14, T19) → f20_out1(T19)

The set Q consists of the following terms:

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 2 SCCs with 4 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

F36_IN(.(T33, T34), .(T33, T35)) → F36_IN(T34, T35)

The TRS R consists of the following rules:

f1_in(T7, []) → f1_out1
f1_in(.(T14, T15), .(T14, T16)) → U1(f20_in(T15, T16, T14), .(T14, T15), .(T14, T16))
U1(f20_out1(X17), .(T14, T15), .(T14, T16)) → f1_out1
f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)
f20_in(T15, T16, T14) → U3(f36_in(T15, T16), T15, T16, T14)
U3(f36_out1(T19), T15, T16, T14) → U4(f1_in(.(T14, T15), T16), T15, T16, T14, T19)
U4(f1_out1, T15, T16, T14, T19) → f20_out1(T19)

The set Q consists of the following terms:

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

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

(10) 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.

(11) Obligation:

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

F36_IN(.(T33, T34), .(T33, T35)) → F36_IN(T34, T35)

R is empty.
The set Q consists of the following terms:

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

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

(12) 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].

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

(13) Obligation:

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

F36_IN(.(T33, T34), .(T33, T35)) → F36_IN(T34, T35)

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

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

  • F36_IN(.(T33, T34), .(T33, T35)) → F36_IN(T34, T35)
    The graph contains the following edges 1 > 1, 2 > 2

(15) YES

(16) Obligation:

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

F1_IN(.(T14, T15), .(T14, T16)) → F20_IN(T15, T16, T14)
F20_IN(T15, T16, T14) → U31(f36_in(T15, T16), T15, T16, T14)
U31(f36_out1(T19), T15, T16, T14) → F1_IN(.(T14, T15), T16)

The TRS R consists of the following rules:

f1_in(T7, []) → f1_out1
f1_in(.(T14, T15), .(T14, T16)) → U1(f20_in(T15, T16, T14), .(T14, T15), .(T14, T16))
U1(f20_out1(X17), .(T14, T15), .(T14, T16)) → f1_out1
f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)
f20_in(T15, T16, T14) → U3(f36_in(T15, T16), T15, T16, T14)
U3(f36_out1(T19), T15, T16, T14) → U4(f1_in(.(T14, T15), T16), T15, T16, T14, T19)
U4(f1_out1, T15, T16, T14, T19) → f20_out1(T19)

The set Q consists of the following terms:

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

We have to consider all minimal (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:

F1_IN(.(T14, T15), .(T14, T16)) → F20_IN(T15, T16, T14)
F20_IN(T15, T16, T14) → U31(f36_in(T15, T16), T15, T16, T14)
U31(f36_out1(T19), T15, T16, T14) → F1_IN(.(T14, T15), T16)

The TRS R consists of the following rules:

f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)

The set Q consists of the following terms:

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

We have to consider all minimal (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].

f1_in(x0, [])
f1_in(.(x0, x1), .(x0, x2))
U1(f20_out1(x0), .(x1, x2), .(x1, x3))
f20_in(x0, x1, x2)
U3(f36_out1(x0), x1, x2, x3)
U4(f1_out1, x0, x1, x2, x3)

(20) Obligation:

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

F1_IN(.(T14, T15), .(T14, T16)) → F20_IN(T15, T16, T14)
F20_IN(T15, T16, T14) → U31(f36_in(T15, T16), T15, T16, T14)
U31(f36_out1(T19), T15, T16, T14) → F1_IN(.(T14, T15), T16)

The TRS R consists of the following rules:

f36_in([], T26) → f36_out1(T26)
f36_in(.(T33, T34), .(T33, T35)) → U2(f36_in(T34, T35), .(T33, T34), .(T33, T35))
U2(f36_out1(X50), .(T33, T34), .(T33, T35)) → f36_out1(X50)

The set Q consists of the following terms:

f36_in([], x0)
f36_in(.(x0, x1), .(x0, x2))
U2(f36_out1(x0), .(x1, x2), .(x1, x3))

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

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

  • F20_IN(T15, T16, T14) → U31(f36_in(T15, T16), T15, T16, T14)
    The graph contains the following edges 1 >= 2, 2 >= 3, 3 >= 4

  • U31(f36_out1(T19), T15, T16, T14) → F1_IN(.(T14, T15), T16)
    The graph contains the following edges 3 >= 2

  • F1_IN(.(T14, T15), .(T14, T16)) → F20_IN(T15, T16, T14)
    The graph contains the following edges 1 > 1, 2 > 2, 1 > 3, 2 > 3

(22) YES