(0) Obligation:

Clauses:

p(a, b).
p(b, c).
tc(X, X).
tc(X, Y) :- ','(p(X, Z), tc(Z, Y)).

Queries:

tc(g,a).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

tc21(c).
tc10(b).
tc10(T15) :- tc21(T15).
tc1(T4, T4).
tc1(a, T9) :- tc10(T9).
tc1(b, T9) :- tc21(T9).
tc1(a, T28) :- tc10(T28).
tc1(b, T28) :- tc21(T28).

Queries:

tc1(g,a).

(3) PrologToPiTRSProof (SOUND transformation)

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

tc1_in_ga(T4, T4) → tc1_out_ga(T4, T4)
tc1_in_ga(a, T9) → U2_ga(T9, tc10_in_a(T9))
tc10_in_a(b) → tc10_out_a(b)
tc10_in_a(T15) → U1_a(T15, tc21_in_a(T15))
tc21_in_a(c) → tc21_out_a(c)
U1_a(T15, tc21_out_a(T15)) → tc10_out_a(T15)
U2_ga(T9, tc10_out_a(T9)) → tc1_out_ga(a, T9)
tc1_in_ga(b, T9) → U3_ga(T9, tc21_in_a(T9))
U3_ga(T9, tc21_out_a(T9)) → tc1_out_ga(b, T9)
tc1_in_ga(a, T28) → U4_ga(T28, tc10_in_a(T28))
U4_ga(T28, tc10_out_a(T28)) → tc1_out_ga(a, T28)
tc1_in_ga(b, T28) → U5_ga(T28, tc21_in_a(T28))
U5_ga(T28, tc21_out_a(T28)) → tc1_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tc1_in_ga(x1, x2)  =  tc1_in_ga(x1)
tc1_out_ga(x1, x2)  =  tc1_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tc10_in_a(x1)  =  tc10_in_a
tc10_out_a(x1)  =  tc10_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tc21_in_a(x1)  =  tc21_in_a
tc21_out_a(x1)  =  tc21_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

tc1_in_ga(T4, T4) → tc1_out_ga(T4, T4)
tc1_in_ga(a, T9) → U2_ga(T9, tc10_in_a(T9))
tc10_in_a(b) → tc10_out_a(b)
tc10_in_a(T15) → U1_a(T15, tc21_in_a(T15))
tc21_in_a(c) → tc21_out_a(c)
U1_a(T15, tc21_out_a(T15)) → tc10_out_a(T15)
U2_ga(T9, tc10_out_a(T9)) → tc1_out_ga(a, T9)
tc1_in_ga(b, T9) → U3_ga(T9, tc21_in_a(T9))
U3_ga(T9, tc21_out_a(T9)) → tc1_out_ga(b, T9)
tc1_in_ga(a, T28) → U4_ga(T28, tc10_in_a(T28))
U4_ga(T28, tc10_out_a(T28)) → tc1_out_ga(a, T28)
tc1_in_ga(b, T28) → U5_ga(T28, tc21_in_a(T28))
U5_ga(T28, tc21_out_a(T28)) → tc1_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tc1_in_ga(x1, x2)  =  tc1_in_ga(x1)
tc1_out_ga(x1, x2)  =  tc1_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tc10_in_a(x1)  =  tc10_in_a
tc10_out_a(x1)  =  tc10_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tc21_in_a(x1)  =  tc21_in_a
tc21_out_a(x1)  =  tc21_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)

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

TC1_IN_GA(a, T9) → U2_GA(T9, tc10_in_a(T9))
TC1_IN_GA(a, T9) → TC10_IN_A(T9)
TC10_IN_A(T15) → U1_A(T15, tc21_in_a(T15))
TC10_IN_A(T15) → TC21_IN_A(T15)
TC1_IN_GA(b, T9) → U3_GA(T9, tc21_in_a(T9))
TC1_IN_GA(b, T9) → TC21_IN_A(T9)
TC1_IN_GA(a, T28) → U4_GA(T28, tc10_in_a(T28))
TC1_IN_GA(b, T28) → U5_GA(T28, tc21_in_a(T28))

The TRS R consists of the following rules:

tc1_in_ga(T4, T4) → tc1_out_ga(T4, T4)
tc1_in_ga(a, T9) → U2_ga(T9, tc10_in_a(T9))
tc10_in_a(b) → tc10_out_a(b)
tc10_in_a(T15) → U1_a(T15, tc21_in_a(T15))
tc21_in_a(c) → tc21_out_a(c)
U1_a(T15, tc21_out_a(T15)) → tc10_out_a(T15)
U2_ga(T9, tc10_out_a(T9)) → tc1_out_ga(a, T9)
tc1_in_ga(b, T9) → U3_ga(T9, tc21_in_a(T9))
U3_ga(T9, tc21_out_a(T9)) → tc1_out_ga(b, T9)
tc1_in_ga(a, T28) → U4_ga(T28, tc10_in_a(T28))
U4_ga(T28, tc10_out_a(T28)) → tc1_out_ga(a, T28)
tc1_in_ga(b, T28) → U5_ga(T28, tc21_in_a(T28))
U5_ga(T28, tc21_out_a(T28)) → tc1_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tc1_in_ga(x1, x2)  =  tc1_in_ga(x1)
tc1_out_ga(x1, x2)  =  tc1_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tc10_in_a(x1)  =  tc10_in_a
tc10_out_a(x1)  =  tc10_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tc21_in_a(x1)  =  tc21_in_a
tc21_out_a(x1)  =  tc21_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)
TC1_IN_GA(x1, x2)  =  TC1_IN_GA(x1)
U2_GA(x1, x2)  =  U2_GA(x2)
TC10_IN_A(x1)  =  TC10_IN_A
U1_A(x1, x2)  =  U1_A(x2)
TC21_IN_A(x1)  =  TC21_IN_A
U3_GA(x1, x2)  =  U3_GA(x2)
U4_GA(x1, x2)  =  U4_GA(x2)
U5_GA(x1, x2)  =  U5_GA(x2)

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

(6) Obligation:

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

TC1_IN_GA(a, T9) → U2_GA(T9, tc10_in_a(T9))
TC1_IN_GA(a, T9) → TC10_IN_A(T9)
TC10_IN_A(T15) → U1_A(T15, tc21_in_a(T15))
TC10_IN_A(T15) → TC21_IN_A(T15)
TC1_IN_GA(b, T9) → U3_GA(T9, tc21_in_a(T9))
TC1_IN_GA(b, T9) → TC21_IN_A(T9)
TC1_IN_GA(a, T28) → U4_GA(T28, tc10_in_a(T28))
TC1_IN_GA(b, T28) → U5_GA(T28, tc21_in_a(T28))

The TRS R consists of the following rules:

tc1_in_ga(T4, T4) → tc1_out_ga(T4, T4)
tc1_in_ga(a, T9) → U2_ga(T9, tc10_in_a(T9))
tc10_in_a(b) → tc10_out_a(b)
tc10_in_a(T15) → U1_a(T15, tc21_in_a(T15))
tc21_in_a(c) → tc21_out_a(c)
U1_a(T15, tc21_out_a(T15)) → tc10_out_a(T15)
U2_ga(T9, tc10_out_a(T9)) → tc1_out_ga(a, T9)
tc1_in_ga(b, T9) → U3_ga(T9, tc21_in_a(T9))
U3_ga(T9, tc21_out_a(T9)) → tc1_out_ga(b, T9)
tc1_in_ga(a, T28) → U4_ga(T28, tc10_in_a(T28))
U4_ga(T28, tc10_out_a(T28)) → tc1_out_ga(a, T28)
tc1_in_ga(b, T28) → U5_ga(T28, tc21_in_a(T28))
U5_ga(T28, tc21_out_a(T28)) → tc1_out_ga(b, T28)

The argument filtering Pi contains the following mapping:
tc1_in_ga(x1, x2)  =  tc1_in_ga(x1)
tc1_out_ga(x1, x2)  =  tc1_out_ga(x2)
a  =  a
U2_ga(x1, x2)  =  U2_ga(x2)
tc10_in_a(x1)  =  tc10_in_a
tc10_out_a(x1)  =  tc10_out_a(x1)
U1_a(x1, x2)  =  U1_a(x2)
tc21_in_a(x1)  =  tc21_in_a
tc21_out_a(x1)  =  tc21_out_a(x1)
b  =  b
U3_ga(x1, x2)  =  U3_ga(x2)
U4_ga(x1, x2)  =  U4_ga(x2)
U5_ga(x1, x2)  =  U5_ga(x2)
TC1_IN_GA(x1, x2)  =  TC1_IN_GA(x1)
U2_GA(x1, x2)  =  U2_GA(x2)
TC10_IN_A(x1)  =  TC10_IN_A
U1_A(x1, x2)  =  U1_A(x2)
TC21_IN_A(x1)  =  TC21_IN_A
U3_GA(x1, x2)  =  U3_GA(x2)
U4_GA(x1, x2)  =  U4_GA(x2)
U5_GA(x1, x2)  =  U5_GA(x2)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 0 SCCs with 8 less nodes.

(8) TRUE