(0) Obligation:

Clauses:

p(d(e(t)), const(1)).
p(d(e(const(A))), const(0)).
p(d(e(+(X, Y))), +(DX, DY)) :- ','(p(d(e(X)), DX), p(d(e(Y)), DY)).
p(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) :- ','(p(d(e(X)), DX), p(d(e(Y)), DY)).
p(d(d(X)), DDX) :- ','(p(d(X), DX), p(d(e(DX)), DDX)).

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

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
f2_in(d(d(T57))) → U3(f81_in(T57), d(d(T57)))
U3(f81_out1(X53, T59), d(d(T57))) → f2_out1(T59)
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
f81_in(T57) → U6(f2_in(d(T57)), T57)
U6(f2_out1(T60), T57) → U7(f2_in(d(e(T60))), T57, T60)
U7(f2_out1(T59), T57, T60) → f81_out1(T60, T59)

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:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
f2_in(d(d(T57))) → U3(f81_in(T57), d(d(T57)))
U3(f81_out1(X53, T59), d(d(T57))) → f2_out1(T59)
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
f81_in(T57) → U6(f2_in(d(T57)), T57)
U6(f2_out1(T60), T57) → U7(f2_in(d(e(T60))), T57, T60)
U7(f2_out1(T59), T57, T60) → f81_out1(T60, T59)

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

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

F2_IN(d(e(+(T24, T25)))) → U11(f44_in(T24, T25), d(e(+(T24, T25))))
F2_IN(d(e(+(T24, T25)))) → F44_IN(T24, T25)
F2_IN(d(e(*(T47, T48)))) → U21(f44_in(T47, T48), d(e(*(T47, T48))))
F2_IN(d(e(*(T47, T48)))) → F44_IN(T47, T48)
F2_IN(d(d(T57))) → U31(f81_in(T57), d(d(T57)))
F2_IN(d(d(T57))) → F81_IN(T57)
F44_IN(T24, T25) → U41(f2_in(d(e(T24))), T24, T25)
F44_IN(T24, T25) → F2_IN(d(e(T24)))
U41(f2_out1(T28), T24, T25) → U51(f2_in(d(e(T25))), T24, T25, T28)
U41(f2_out1(T28), T24, T25) → F2_IN(d(e(T25)))
F81_IN(T57) → U61(f2_in(d(T57)), T57)
F81_IN(T57) → F2_IN(d(T57))
U61(f2_out1(T60), T57) → U71(f2_in(d(e(T60))), T57, T60)
U61(f2_out1(T60), T57) → F2_IN(d(e(T60)))

The TRS R consists of the following rules:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
f2_in(d(d(T57))) → U3(f81_in(T57), d(d(T57)))
U3(f81_out1(X53, T59), d(d(T57))) → f2_out1(T59)
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
f81_in(T57) → U6(f2_in(d(T57)), T57)
U6(f2_out1(T60), T57) → U7(f2_in(d(e(T60))), T57, T60)
U7(f2_out1(T59), T57, T60) → f81_out1(T60, T59)

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

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 7 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

F2_IN(d(e(+(T24, T25)))) → F44_IN(T24, T25)
F44_IN(T24, T25) → U41(f2_in(d(e(T24))), T24, T25)
U41(f2_out1(T28), T24, T25) → F2_IN(d(e(T25)))
F2_IN(d(e(*(T47, T48)))) → F44_IN(T47, T48)
F44_IN(T24, T25) → F2_IN(d(e(T24)))

The TRS R consists of the following rules:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
f2_in(d(d(T57))) → U3(f81_in(T57), d(d(T57)))
U3(f81_out1(X53, T59), d(d(T57))) → f2_out1(T59)
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
f81_in(T57) → U6(f2_in(d(T57)), T57)
U6(f2_out1(T60), T57) → U7(f2_in(d(e(T60))), T57, T60)
U7(f2_out1(T59), T57, T60) → f81_out1(T60, T59)

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

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:

F2_IN(d(e(+(T24, T25)))) → F44_IN(T24, T25)
F44_IN(T24, T25) → U41(f2_in(d(e(T24))), T24, T25)
U41(f2_out1(T28), T24, T25) → F2_IN(d(e(T25)))
F2_IN(d(e(*(T47, T48)))) → F44_IN(T47, T48)
F44_IN(T24, T25) → F2_IN(d(e(T24)))

The TRS R consists of the following rules:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

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].

U3(f81_out1(x0, x1), d(d(x2)))
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

(13) Obligation:

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

F2_IN(d(e(+(T24, T25)))) → F44_IN(T24, T25)
F44_IN(T24, T25) → U41(f2_in(d(e(T24))), T24, T25)
U41(f2_out1(T28), T24, T25) → F2_IN(d(e(T25)))
F2_IN(d(e(*(T47, T48)))) → F44_IN(T47, T48)
F44_IN(T24, T25) → F2_IN(d(e(T24)))

The TRS R consists of the following rules:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)

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

(14) QDPOrderProof (EQUIVALENT transformation)

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


The following pairs can be oriented strictly and are deleted.


F44_IN(T24, T25) → U41(f2_in(d(e(T24))), T24, T25)
F44_IN(T24, T25) → F2_IN(d(e(T24)))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(*(x1, x2)) = 1 + x1 + x2   
POL(+(x1, x2)) = 1 + x1 + x2   
POL(0) = 0   
POL(1) = 0   
POL(F2_IN(x1)) = x1   
POL(F44_IN(x1, x2)) = 1 + x1 + x2   
POL(U1(x1, x2)) = 0   
POL(U2(x1, x2)) = 0   
POL(U4(x1, x2, x3)) = 0   
POL(U41(x1, x2, x3)) = x3   
POL(U5(x1, x2, x3, x4)) = 0   
POL(const(x1)) = 0   
POL(d(x1)) = x1   
POL(e(x1)) = x1   
POL(f2_in(x1)) = 0   
POL(f2_out1(x1)) = 0   
POL(f44_in(x1, x2)) = 0   
POL(f44_out1(x1, x2)) = 0   
POL(t) = 0   

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

(15) Obligation:

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

F2_IN(d(e(+(T24, T25)))) → F44_IN(T24, T25)
U41(f2_out1(T28), T24, T25) → F2_IN(d(e(T25)))
F2_IN(d(e(*(T47, T48)))) → F44_IN(T47, T48)

The TRS R consists of the following rules:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)

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

(16) DependencyGraphProof (EQUIVALENT transformation)

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

(17) TRUE

(18) Obligation:

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

F2_IN(d(d(T57))) → F81_IN(T57)
F81_IN(T57) → F2_IN(d(T57))

The TRS R consists of the following rules:

f2_in(d(e(t))) → f2_out1(const(1))
f2_in(d(e(const(T7)))) → f2_out1(const(0))
f2_in(d(e(+(T24, T25)))) → U1(f44_in(T24, T25), d(e(+(T24, T25))))
U1(f44_out1(T28, T29), d(e(+(T24, T25)))) → f2_out1(+(T28, T29))
f2_in(d(e(*(T47, T48)))) → U2(f44_in(T47, T48), d(e(*(T47, T48))))
U2(f44_out1(T51, T52), d(e(*(T47, T48)))) → f2_out1(+(*(T47, T52), *(T48, T51)))
f2_in(d(d(T57))) → U3(f81_in(T57), d(d(T57)))
U3(f81_out1(X53, T59), d(d(T57))) → f2_out1(T59)
f44_in(T24, T25) → U4(f2_in(d(e(T24))), T24, T25)
U4(f2_out1(T28), T24, T25) → U5(f2_in(d(e(T25))), T24, T25, T28)
U5(f2_out1(T30), T24, T25, T28) → f44_out1(T28, T30)
f81_in(T57) → U6(f2_in(d(T57)), T57)
U6(f2_out1(T60), T57) → U7(f2_in(d(e(T60))), T57, T60)
U7(f2_out1(T59), T57, T60) → f81_out1(T60, T59)

The set Q consists of the following terms:

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

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

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

(20) Obligation:

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

F2_IN(d(d(T57))) → F81_IN(T57)
F81_IN(T57) → F2_IN(d(T57))

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

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

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

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

f2_in(d(e(t)))
f2_in(d(e(const(x0))))
f2_in(d(e(+(x0, x1))))
U1(f44_out1(x0, x1), d(e(+(x2, x3))))
f2_in(d(e(*(x0, x1))))
U2(f44_out1(x0, x1), d(e(*(x2, x3))))
f2_in(d(d(x0)))
U3(f81_out1(x0, x1), d(d(x2)))
f44_in(x0, x1)
U4(f2_out1(x0), x1, x2)
U5(f2_out1(x0), x1, x2, x3)
f81_in(x0)
U6(f2_out1(x0), x1)
U7(f2_out1(x0), x1, x2)

(22) Obligation:

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

F2_IN(d(d(T57))) → F81_IN(T57)
F81_IN(T57) → F2_IN(d(T57))

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

(23) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

F2_IN(d(d(T57))) → F81_IN(T57)
F81_IN(T57) → F2_IN(d(T57))


Used ordering: Knuth-Bendix order [KBO] with precedence:
F81IN1 > d1 > F2IN1

and weight map:

F2_IN_1=1
d_1=1
F81_IN_1=2

The variable weight is 1

(24) Obligation:

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

(25) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(26) YES