(0) Obligation:

Clauses:

p(X, X).
p(f(X), g(Y)) :- ','(p(f(X), f(Z)), p(Z, g(W))).

Query: p(g,a)

(1) PrologToPiTRSViaGraphTransformerProof (SOUND transformation)

Transformed Prolog program to (Pi-)TRS.

(2) Obligation:

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

pA_in_ga(T4, T4) → pA_out_ga(T4, T4)
pA_in_ga(f(T7), g(T8)) → U1_ga(T7, T8, pB_in_gaa(T7, X7, X8))
pB_in_gaa(T21, T21, X8) → U3_gaa(T21, X8, pC_in_ga(T21, X8))
pC_in_ga(g(T35), T35) → pC_out_ga(g(T35), T35)
pC_in_ga(f(T38), X37) → U4_ga(T38, X37, pB_in_gaa(T38, X35, X36))
U4_ga(T38, X37, pB_out_gaa(T38, X35, X36)) → pC_out_ga(f(T38), X37)
U3_gaa(T21, X8, pC_out_ga(T21, X8)) → pB_out_gaa(T21, T21, X8)
U1_ga(T7, T8, pB_out_gaa(T7, X7, X8)) → pA_out_ga(f(T7), g(T8))
pA_in_ga(f(T57), g(T44)) → U2_ga(T57, T44, pC_in_ga(T57, X49))
U2_ga(T57, T44, pC_out_ga(T57, X49)) → pA_out_ga(f(T57), g(T44))

The argument filtering Pi contains the following mapping:
pA_in_ga(x1, x2)  =  pA_in_ga(x1)
pA_out_ga(x1, x2)  =  pA_out_ga(x1, x2)
f(x1)  =  f(x1)
U1_ga(x1, x2, x3)  =  U1_ga(x1, x3)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U3_gaa(x1, x2, x3)  =  U3_gaa(x1, x3)
pC_in_ga(x1, x2)  =  pC_in_ga(x1)
g(x1)  =  g
pC_out_ga(x1, x2)  =  pC_out_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)

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

PA_IN_GA(f(T7), g(T8)) → U1_GA(T7, T8, pB_in_gaa(T7, X7, X8))
PA_IN_GA(f(T7), g(T8)) → PB_IN_GAA(T7, X7, X8)
PB_IN_GAA(T21, T21, X8) → U3_GAA(T21, X8, pC_in_ga(T21, X8))
PB_IN_GAA(T21, T21, X8) → PC_IN_GA(T21, X8)
PC_IN_GA(f(T38), X37) → U4_GA(T38, X37, pB_in_gaa(T38, X35, X36))
PC_IN_GA(f(T38), X37) → PB_IN_GAA(T38, X35, X36)
PA_IN_GA(f(T57), g(T44)) → U2_GA(T57, T44, pC_in_ga(T57, X49))
PA_IN_GA(f(T57), g(T44)) → PC_IN_GA(T57, X49)

The TRS R consists of the following rules:

pA_in_ga(T4, T4) → pA_out_ga(T4, T4)
pA_in_ga(f(T7), g(T8)) → U1_ga(T7, T8, pB_in_gaa(T7, X7, X8))
pB_in_gaa(T21, T21, X8) → U3_gaa(T21, X8, pC_in_ga(T21, X8))
pC_in_ga(g(T35), T35) → pC_out_ga(g(T35), T35)
pC_in_ga(f(T38), X37) → U4_ga(T38, X37, pB_in_gaa(T38, X35, X36))
U4_ga(T38, X37, pB_out_gaa(T38, X35, X36)) → pC_out_ga(f(T38), X37)
U3_gaa(T21, X8, pC_out_ga(T21, X8)) → pB_out_gaa(T21, T21, X8)
U1_ga(T7, T8, pB_out_gaa(T7, X7, X8)) → pA_out_ga(f(T7), g(T8))
pA_in_ga(f(T57), g(T44)) → U2_ga(T57, T44, pC_in_ga(T57, X49))
U2_ga(T57, T44, pC_out_ga(T57, X49)) → pA_out_ga(f(T57), g(T44))

The argument filtering Pi contains the following mapping:
pA_in_ga(x1, x2)  =  pA_in_ga(x1)
pA_out_ga(x1, x2)  =  pA_out_ga(x1, x2)
f(x1)  =  f(x1)
U1_ga(x1, x2, x3)  =  U1_ga(x1, x3)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U3_gaa(x1, x2, x3)  =  U3_gaa(x1, x3)
pC_in_ga(x1, x2)  =  pC_in_ga(x1)
g(x1)  =  g
pC_out_ga(x1, x2)  =  pC_out_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
PA_IN_GA(x1, x2)  =  PA_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
PB_IN_GAA(x1, x2, x3)  =  PB_IN_GAA(x1)
U3_GAA(x1, x2, x3)  =  U3_GAA(x1, x3)
PC_IN_GA(x1, x2)  =  PC_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x1, x3)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)

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

(4) Obligation:

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

PA_IN_GA(f(T7), g(T8)) → U1_GA(T7, T8, pB_in_gaa(T7, X7, X8))
PA_IN_GA(f(T7), g(T8)) → PB_IN_GAA(T7, X7, X8)
PB_IN_GAA(T21, T21, X8) → U3_GAA(T21, X8, pC_in_ga(T21, X8))
PB_IN_GAA(T21, T21, X8) → PC_IN_GA(T21, X8)
PC_IN_GA(f(T38), X37) → U4_GA(T38, X37, pB_in_gaa(T38, X35, X36))
PC_IN_GA(f(T38), X37) → PB_IN_GAA(T38, X35, X36)
PA_IN_GA(f(T57), g(T44)) → U2_GA(T57, T44, pC_in_ga(T57, X49))
PA_IN_GA(f(T57), g(T44)) → PC_IN_GA(T57, X49)

The TRS R consists of the following rules:

pA_in_ga(T4, T4) → pA_out_ga(T4, T4)
pA_in_ga(f(T7), g(T8)) → U1_ga(T7, T8, pB_in_gaa(T7, X7, X8))
pB_in_gaa(T21, T21, X8) → U3_gaa(T21, X8, pC_in_ga(T21, X8))
pC_in_ga(g(T35), T35) → pC_out_ga(g(T35), T35)
pC_in_ga(f(T38), X37) → U4_ga(T38, X37, pB_in_gaa(T38, X35, X36))
U4_ga(T38, X37, pB_out_gaa(T38, X35, X36)) → pC_out_ga(f(T38), X37)
U3_gaa(T21, X8, pC_out_ga(T21, X8)) → pB_out_gaa(T21, T21, X8)
U1_ga(T7, T8, pB_out_gaa(T7, X7, X8)) → pA_out_ga(f(T7), g(T8))
pA_in_ga(f(T57), g(T44)) → U2_ga(T57, T44, pC_in_ga(T57, X49))
U2_ga(T57, T44, pC_out_ga(T57, X49)) → pA_out_ga(f(T57), g(T44))

The argument filtering Pi contains the following mapping:
pA_in_ga(x1, x2)  =  pA_in_ga(x1)
pA_out_ga(x1, x2)  =  pA_out_ga(x1, x2)
f(x1)  =  f(x1)
U1_ga(x1, x2, x3)  =  U1_ga(x1, x3)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U3_gaa(x1, x2, x3)  =  U3_gaa(x1, x3)
pC_in_ga(x1, x2)  =  pC_in_ga(x1)
g(x1)  =  g
pC_out_ga(x1, x2)  =  pC_out_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
PA_IN_GA(x1, x2)  =  PA_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
PB_IN_GAA(x1, x2, x3)  =  PB_IN_GAA(x1)
U3_GAA(x1, x2, x3)  =  U3_GAA(x1, x3)
PC_IN_GA(x1, x2)  =  PC_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x1, x3)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 1 SCC with 6 less nodes.

(6) Obligation:

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

PB_IN_GAA(T21, T21, X8) → PC_IN_GA(T21, X8)
PC_IN_GA(f(T38), X37) → PB_IN_GAA(T38, X35, X36)

The TRS R consists of the following rules:

pA_in_ga(T4, T4) → pA_out_ga(T4, T4)
pA_in_ga(f(T7), g(T8)) → U1_ga(T7, T8, pB_in_gaa(T7, X7, X8))
pB_in_gaa(T21, T21, X8) → U3_gaa(T21, X8, pC_in_ga(T21, X8))
pC_in_ga(g(T35), T35) → pC_out_ga(g(T35), T35)
pC_in_ga(f(T38), X37) → U4_ga(T38, X37, pB_in_gaa(T38, X35, X36))
U4_ga(T38, X37, pB_out_gaa(T38, X35, X36)) → pC_out_ga(f(T38), X37)
U3_gaa(T21, X8, pC_out_ga(T21, X8)) → pB_out_gaa(T21, T21, X8)
U1_ga(T7, T8, pB_out_gaa(T7, X7, X8)) → pA_out_ga(f(T7), g(T8))
pA_in_ga(f(T57), g(T44)) → U2_ga(T57, T44, pC_in_ga(T57, X49))
U2_ga(T57, T44, pC_out_ga(T57, X49)) → pA_out_ga(f(T57), g(T44))

The argument filtering Pi contains the following mapping:
pA_in_ga(x1, x2)  =  pA_in_ga(x1)
pA_out_ga(x1, x2)  =  pA_out_ga(x1, x2)
f(x1)  =  f(x1)
U1_ga(x1, x2, x3)  =  U1_ga(x1, x3)
pB_in_gaa(x1, x2, x3)  =  pB_in_gaa(x1)
U3_gaa(x1, x2, x3)  =  U3_gaa(x1, x3)
pC_in_ga(x1, x2)  =  pC_in_ga(x1)
g(x1)  =  g
pC_out_ga(x1, x2)  =  pC_out_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x1, x3)
pB_out_gaa(x1, x2, x3)  =  pB_out_gaa(x1, x2)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
PB_IN_GAA(x1, x2, x3)  =  PB_IN_GAA(x1)
PC_IN_GA(x1, x2)  =  PC_IN_GA(x1)

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

(7) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(8) Obligation:

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

PB_IN_GAA(T21, T21, X8) → PC_IN_GA(T21, X8)
PC_IN_GA(f(T38), X37) → PB_IN_GAA(T38, X35, X36)

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

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

(9) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(10) Obligation:

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

PB_IN_GAA(T21) → PC_IN_GA(T21)
PC_IN_GA(f(T38)) → PB_IN_GAA(T38)

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

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

  • PC_IN_GA(f(T38)) → PB_IN_GAA(T38)
    The graph contains the following edges 1 > 1

  • PB_IN_GAA(T21) → PC_IN_GA(T21)
    The graph contains the following edges 1 >= 1

(12) YES