(0) Obligation:

Clauses:

d(X, X, 1).
d(T, X1, 0) :- isnumber(T).
d(times(U, V), X, +(times(B, U), times(A, V))) :- ','(d(U, X, A), d(V, X, B)).
d(div(U, V), X, W) :- d(times(U, power(V, p(0))), X, W).
d(power(U, V), X, times(V, times(W, power(U, p(V))))) :- ','(isnumber(V), d(U, X, W)).
isnumber(0).
isnumber(s(X)) :- isnumber(X).
isnumber(p(X)) :- isnumber(X).

Query: d(g,g,a)

(1) PrologToTRSTransformerProof (SOUND transformation)

Transformed Prolog program to TRS.

(2) Obligation:

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

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

Q is empty.

(3) DependencyPairsProof (EQUIVALENT transformation)

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

(4) Obligation:

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

F3_IN(T17, T18) → U11(f32_in(T17), T17, T18)
F3_IN(T17, T18) → F32_IN(T17)
F3_IN(times(T47, T48), T49) → U21(f96_in(T47, T49, T48), times(T47, T48), T49)
F3_IN(times(T47, T48), T49) → F96_IN(T47, T49, T48)
F3_IN(div(T77, T78), T79) → U31(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
F3_IN(div(T77, T78), T79) → F3_IN(times(T77, power(T78, p(0))), T79)
F3_IN(power(T94, T95), T96) → U41(f124_in(T95, T94, T96), power(T94, T95), T96)
F3_IN(power(T94, T95), T96) → F124_IN(T95, T94, T96)
F32_IN(s(T23)) → U51(f32_in(T23), s(T23))
F32_IN(s(T23)) → F32_IN(T23)
F32_IN(p(T26)) → U61(f32_in(T26), p(T26))
F32_IN(p(T26)) → F32_IN(T26)
F96_IN(T47, T49, T48) → U71(f3_in(T47, T49), T47, T49, T48)
F96_IN(T47, T49, T48) → F3_IN(T47, T49)
U71(f3_out1(T52), T47, T49, T48) → U81(f3_in(T48, T49), T47, T49, T48, T52)
U71(f3_out1(T52), T47, T49, T48) → F3_IN(T48, T49)
F124_IN(T95, T94, T96) → U91(f32_in(T95), T95, T94, T96)
F124_IN(T95, T94, T96) → F32_IN(T95)
U91(f32_out1, T95, T94, T96) → U101(f3_in(T94, T96), T95, T94, T96)
U91(f32_out1, T95, T94, T96) → F3_IN(T94, T96)

The TRS R consists of the following rules:

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

F32_IN(p(T26)) → F32_IN(T26)
F32_IN(s(T23)) → F32_IN(T23)

The TRS R consists of the following rules:

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

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

(8) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(9) Obligation:

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

F32_IN(p(T26)) → F32_IN(T26)
F32_IN(s(T23)) → F32_IN(T23)

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

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

  • F32_IN(p(T26)) → F32_IN(T26)
    The graph contains the following edges 1 > 1

  • F32_IN(s(T23)) → F32_IN(T23)
    The graph contains the following edges 1 > 1

(11) YES

(12) Obligation:

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

F3_IN(times(T47, T48), T49) → F96_IN(T47, T49, T48)
F96_IN(T47, T49, T48) → U71(f3_in(T47, T49), T47, T49, T48)
U71(f3_out1(T52), T47, T49, T48) → F3_IN(T48, T49)
F3_IN(div(T77, T78), T79) → F3_IN(times(T77, power(T78, p(0))), T79)
F3_IN(power(T94, T95), T96) → F124_IN(T95, T94, T96)
F124_IN(T95, T94, T96) → U91(f32_in(T95), T95, T94, T96)
U91(f32_out1, T95, T94, T96) → F3_IN(T94, T96)
F96_IN(T47, T49, T48) → F3_IN(T47, T49)

The TRS R consists of the following rules:

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


F124_IN(T95, T94, T96) → U91(f32_in(T95), T95, T94, T96)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(+(x1, x2)) = 0   
POL(0) = 0   
POL(1) = 0   
POL(F124_IN(x1, x2, x3)) = 1 + x2   
POL(F3_IN(x1, x2)) = x1   
POL(F96_IN(x1, x2, x3)) = x1 + x3   
POL(U1(x1, x2, x3)) = 0   
POL(U10(x1, x2, x3, x4)) = 0   
POL(U2(x1, x2, x3)) = 0   
POL(U3(x1, x2, x3)) = 0   
POL(U4(x1, x2, x3)) = 0   
POL(U5(x1, x2)) = 0   
POL(U6(x1, x2)) = 0   
POL(U7(x1, x2, x3, x4)) = 0   
POL(U71(x1, x2, x3, x4)) = x4   
POL(U8(x1, x2, x3, x4, x5)) = 0   
POL(U9(x1, x2, x3, x4)) = 0   
POL(U91(x1, x2, x3, x4)) = x3   
POL(div(x1, x2)) = 1 + x1 + x2   
POL(f124_in(x1, x2, x3)) = 0   
POL(f124_out1(x1)) = 0   
POL(f32_in(x1)) = 0   
POL(f32_out1) = 0   
POL(f3_in(x1, x2)) = 0   
POL(f3_out1(x1)) = 0   
POL(f96_in(x1, x2, x3)) = 0   
POL(f96_out1(x1, x2)) = 0   
POL(p(x1)) = 0   
POL(power(x1, x2)) = 1 + x1   
POL(s(x1)) = 0   
POL(times(x1, x2)) = x1 + x2   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
none

(14) Obligation:

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

F3_IN(times(T47, T48), T49) → F96_IN(T47, T49, T48)
F96_IN(T47, T49, T48) → U71(f3_in(T47, T49), T47, T49, T48)
U71(f3_out1(T52), T47, T49, T48) → F3_IN(T48, T49)
F3_IN(div(T77, T78), T79) → F3_IN(times(T77, power(T78, p(0))), T79)
F3_IN(power(T94, T95), T96) → F124_IN(T95, T94, T96)
U91(f32_out1, T95, T94, T96) → F3_IN(T94, T96)
F96_IN(T47, T49, T48) → F3_IN(T47, T49)

The TRS R consists of the following rules:

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

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

(15) DependencyGraphProof (EQUIVALENT transformation)

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

(16) Obligation:

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

F96_IN(T47, T49, T48) → U71(f3_in(T47, T49), T47, T49, T48)
U71(f3_out1(T52), T47, T49, T48) → F3_IN(T48, T49)
F3_IN(times(T47, T48), T49) → F96_IN(T47, T49, T48)
F96_IN(T47, T49, T48) → F3_IN(T47, T49)
F3_IN(div(T77, T78), T79) → F3_IN(times(T77, power(T78, p(0))), T79)

The TRS R consists of the following rules:

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

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

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04,JAR06].


The following pairs can be oriented strictly and are deleted.


F3_IN(times(T47, T48), T49) → F96_IN(T47, T49, T48)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(+(x1, x2)) = 0   
POL(0) = 0   
POL(1) = 0   
POL(F3_IN(x1, x2)) = x1   
POL(F96_IN(x1, x2, x3)) = x1 + x3   
POL(U1(x1, x2, x3)) = 0   
POL(U10(x1, x2, x3, x4)) = 0   
POL(U2(x1, x2, x3)) = 0   
POL(U3(x1, x2, x3)) = 0   
POL(U4(x1, x2, x3)) = 0   
POL(U5(x1, x2)) = 0   
POL(U6(x1, x2)) = 0   
POL(U7(x1, x2, x3, x4)) = 0   
POL(U71(x1, x2, x3, x4)) = x4   
POL(U8(x1, x2, x3, x4, x5)) = 0   
POL(U9(x1, x2, x3, x4)) = 0   
POL(div(x1, x2)) = 1 + x1 + x2   
POL(f124_in(x1, x2, x3)) = 0   
POL(f124_out1(x1)) = 0   
POL(f32_in(x1)) = 0   
POL(f32_out1) = 0   
POL(f3_in(x1, x2)) = 0   
POL(f3_out1(x1)) = 0   
POL(f96_in(x1, x2, x3)) = 0   
POL(f96_out1(x1, x2)) = 0   
POL(p(x1)) = 0   
POL(power(x1, x2)) = x1   
POL(s(x1)) = 0   
POL(times(x1, x2)) = 1 + x1 + x2   

The following usable rules [FROCOS05] with respect to the argument filtering of the ordering [JAR06] were oriented:
none

(18) Obligation:

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

F96_IN(T47, T49, T48) → U71(f3_in(T47, T49), T47, T49, T48)
U71(f3_out1(T52), T47, T49, T48) → F3_IN(T48, T49)
F96_IN(T47, T49, T48) → F3_IN(T47, T49)
F3_IN(div(T77, T78), T79) → F3_IN(times(T77, power(T78, p(0))), T79)

The TRS R consists of the following rules:

f3_in(T8, T8) → f3_out1(1)
f3_in(T17, T18) → U1(f32_in(T17), T17, T18)
U1(f32_out1, T17, T18) → f3_out1(0)
f3_in(times(T47, T48), T49) → U2(f96_in(T47, T49, T48), times(T47, T48), T49)
U2(f96_out1(T52, T53), times(T47, T48), T49) → f3_out1(+(times(T53, T47), times(T52, T48)))
f3_in(div(T77, T78), T79) → U3(f3_in(times(T77, power(T78, p(0))), T79), div(T77, T78), T79)
U3(f3_out1(T81), div(T77, T78), T79) → f3_out1(T81)
f3_in(power(T94, T95), T96) → U4(f124_in(T95, T94, T96), power(T94, T95), T96)
U4(f124_out1(T98), power(T94, T95), T96) → f3_out1(times(T95, times(T98, power(T94, p(T95)))))
f32_in(0) → f32_out1
f32_in(s(T23)) → U5(f32_in(T23), s(T23))
U5(f32_out1, s(T23)) → f32_out1
f32_in(p(T26)) → U6(f32_in(T26), p(T26))
U6(f32_out1, p(T26)) → f32_out1
f96_in(T47, T49, T48) → U7(f3_in(T47, T49), T47, T49, T48)
U7(f3_out1(T52), T47, T49, T48) → U8(f3_in(T48, T49), T47, T49, T48, T52)
U8(f3_out1(T56), T47, T49, T48, T52) → f96_out1(T52, T56)
f124_in(T95, T94, T96) → U9(f32_in(T95), T95, T94, T96)
U9(f32_out1, T95, T94, T96) → U10(f3_in(T94, T96), T95, T94, T96)
U10(f3_out1(T98), T95, T94, T96) → f124_out1(T98)

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

(19) DependencyGraphProof (EQUIVALENT transformation)

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

(20) TRUE