(0) Obligation:
Clauses:
half(0, 0).
half(s(0), 0).
half(s(s(X)), s(Y)) :- half(X, Y).
log(0, s(0)).
log(s(X), s(Y)) :- ','(half(s(X), Z), log(Z, Y)).
Queries:
log(g,a).
(1) PrologToDTProblemTransformerProof (SOUND transformation)
Built DT problem from termination graph.
(2) Obligation:
Triples:
half24(s(s(T14)), s(X31)) :- half24(T14, X31).
log1(s(s(T10)), s(T7)) :- half24(T10, X20).
log1(s(s(T10)), s(T7)) :- ','(halfc24(T10, T11), log1(s(T11), T7)).
Clauses:
logc1(0, s(0)).
logc1(s(0), s(s(0))).
logc1(s(s(T10)), s(T7)) :- ','(halfc24(T10, T11), logc1(s(T11), T7)).
halfc24(0, 0).
halfc24(s(0), 0).
halfc24(s(s(T14)), s(X31)) :- halfc24(T14, X31).
Afs:
log1(x1, x2) = log1(x1)
(3) TriplesToPiDPProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
log1_in: (b,f)
half24_in: (b,f)
halfc24_in: (b,f)
Transforming
TRIPLES into the following
Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:
LOG1_IN_GA(s(s(T10)), s(T7)) → U2_GA(T10, T7, half24_in_ga(T10, X20))
LOG1_IN_GA(s(s(T10)), s(T7)) → HALF24_IN_GA(T10, X20)
HALF24_IN_GA(s(s(T14)), s(X31)) → U1_GA(T14, X31, half24_in_ga(T14, X31))
HALF24_IN_GA(s(s(T14)), s(X31)) → HALF24_IN_GA(T14, X31)
LOG1_IN_GA(s(s(T10)), s(T7)) → U3_GA(T10, T7, halfc24_in_ga(T10, T11))
U3_GA(T10, T7, halfc24_out_ga(T10, T11)) → U4_GA(T10, T7, log1_in_ga(s(T11), T7))
U3_GA(T10, T7, halfc24_out_ga(T10, T11)) → LOG1_IN_GA(s(T11), T7)
The TRS R consists of the following rules:
halfc24_in_ga(0, 0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0), 0) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14)), s(X31)) → U8_ga(T14, X31, halfc24_in_ga(T14, X31))
U8_ga(T14, X31, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
The argument filtering Pi contains the following mapping:
log1_in_ga(
x1,
x2) =
log1_in_ga(
x1)
s(
x1) =
s(
x1)
half24_in_ga(
x1,
x2) =
half24_in_ga(
x1)
halfc24_in_ga(
x1,
x2) =
halfc24_in_ga(
x1)
0 =
0
halfc24_out_ga(
x1,
x2) =
halfc24_out_ga(
x1,
x2)
U8_ga(
x1,
x2,
x3) =
U8_ga(
x1,
x3)
LOG1_IN_GA(
x1,
x2) =
LOG1_IN_GA(
x1)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x1,
x3)
HALF24_IN_GA(
x1,
x2) =
HALF24_IN_GA(
x1)
U1_GA(
x1,
x2,
x3) =
U1_GA(
x1,
x3)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x1,
x3)
U4_GA(
x1,
x2,
x3) =
U4_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES
(4) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LOG1_IN_GA(s(s(T10)), s(T7)) → U2_GA(T10, T7, half24_in_ga(T10, X20))
LOG1_IN_GA(s(s(T10)), s(T7)) → HALF24_IN_GA(T10, X20)
HALF24_IN_GA(s(s(T14)), s(X31)) → U1_GA(T14, X31, half24_in_ga(T14, X31))
HALF24_IN_GA(s(s(T14)), s(X31)) → HALF24_IN_GA(T14, X31)
LOG1_IN_GA(s(s(T10)), s(T7)) → U3_GA(T10, T7, halfc24_in_ga(T10, T11))
U3_GA(T10, T7, halfc24_out_ga(T10, T11)) → U4_GA(T10, T7, log1_in_ga(s(T11), T7))
U3_GA(T10, T7, halfc24_out_ga(T10, T11)) → LOG1_IN_GA(s(T11), T7)
The TRS R consists of the following rules:
halfc24_in_ga(0, 0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0), 0) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14)), s(X31)) → U8_ga(T14, X31, halfc24_in_ga(T14, X31))
U8_ga(T14, X31, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
The argument filtering Pi contains the following mapping:
log1_in_ga(
x1,
x2) =
log1_in_ga(
x1)
s(
x1) =
s(
x1)
half24_in_ga(
x1,
x2) =
half24_in_ga(
x1)
halfc24_in_ga(
x1,
x2) =
halfc24_in_ga(
x1)
0 =
0
halfc24_out_ga(
x1,
x2) =
halfc24_out_ga(
x1,
x2)
U8_ga(
x1,
x2,
x3) =
U8_ga(
x1,
x3)
LOG1_IN_GA(
x1,
x2) =
LOG1_IN_GA(
x1)
U2_GA(
x1,
x2,
x3) =
U2_GA(
x1,
x3)
HALF24_IN_GA(
x1,
x2) =
HALF24_IN_GA(
x1)
U1_GA(
x1,
x2,
x3) =
U1_GA(
x1,
x3)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x1,
x3)
U4_GA(
x1,
x2,
x3) =
U4_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 4 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF24_IN_GA(s(s(T14)), s(X31)) → HALF24_IN_GA(T14, X31)
The TRS R consists of the following rules:
halfc24_in_ga(0, 0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0), 0) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14)), s(X31)) → U8_ga(T14, X31, halfc24_in_ga(T14, X31))
U8_ga(T14, X31, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
halfc24_in_ga(
x1,
x2) =
halfc24_in_ga(
x1)
0 =
0
halfc24_out_ga(
x1,
x2) =
halfc24_out_ga(
x1,
x2)
U8_ga(
x1,
x2,
x3) =
U8_ga(
x1,
x3)
HALF24_IN_GA(
x1,
x2) =
HALF24_IN_GA(
x1)
We have to consider all (P,R,Pi)-chains
(8) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(9) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF24_IN_GA(s(s(T14)), s(X31)) → HALF24_IN_GA(T14, X31)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
HALF24_IN_GA(
x1,
x2) =
HALF24_IN_GA(
x1)
We have to consider all (P,R,Pi)-chains
(10) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(11) Obligation:
Q DP problem:
The TRS P consists of the following rules:
HALF24_IN_GA(s(s(T14))) → HALF24_IN_GA(T14)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(12) 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:
- HALF24_IN_GA(s(s(T14))) → HALF24_IN_GA(T14)
The graph contains the following edges 1 > 1
(13) YES
(14) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LOG1_IN_GA(s(s(T10)), s(T7)) → U3_GA(T10, T7, halfc24_in_ga(T10, T11))
U3_GA(T10, T7, halfc24_out_ga(T10, T11)) → LOG1_IN_GA(s(T11), T7)
The TRS R consists of the following rules:
halfc24_in_ga(0, 0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0), 0) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14)), s(X31)) → U8_ga(T14, X31, halfc24_in_ga(T14, X31))
U8_ga(T14, X31, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
halfc24_in_ga(
x1,
x2) =
halfc24_in_ga(
x1)
0 =
0
halfc24_out_ga(
x1,
x2) =
halfc24_out_ga(
x1,
x2)
U8_ga(
x1,
x2,
x3) =
U8_ga(
x1,
x3)
LOG1_IN_GA(
x1,
x2) =
LOG1_IN_GA(
x1)
U3_GA(
x1,
x2,
x3) =
U3_GA(
x1,
x3)
We have to consider all (P,R,Pi)-chains
(15) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(16) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LOG1_IN_GA(s(s(T10))) → U3_GA(T10, halfc24_in_ga(T10))
U3_GA(T10, halfc24_out_ga(T10, T11)) → LOG1_IN_GA(s(T11))
The TRS R consists of the following rules:
halfc24_in_ga(0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0)) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14))) → U8_ga(T14, halfc24_in_ga(T14))
U8_ga(T14, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
The set Q consists of the following terms:
halfc24_in_ga(x0)
U8_ga(x0, x1)
We have to consider all (P,Q,R)-chains.
(17) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04].
The following pairs can be oriented strictly and are deleted.
LOG1_IN_GA(s(s(T10))) → U3_GA(T10, halfc24_in_ga(T10))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:
POL(0) = 0
POL(LOG1_IN_GA(x1)) = x1
POL(U3_GA(x1, x2)) = 1 + x2
POL(U8_ga(x1, x2)) = 1 + x2
POL(halfc24_in_ga(x1)) = x1
POL(halfc24_out_ga(x1, x2)) = x2
POL(s(x1)) = 1 + x1
The following usable rules [FROCOS05] were oriented:
halfc24_in_ga(0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0)) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14))) → U8_ga(T14, halfc24_in_ga(T14))
U8_ga(T14, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U3_GA(T10, halfc24_out_ga(T10, T11)) → LOG1_IN_GA(s(T11))
The TRS R consists of the following rules:
halfc24_in_ga(0) → halfc24_out_ga(0, 0)
halfc24_in_ga(s(0)) → halfc24_out_ga(s(0), 0)
halfc24_in_ga(s(s(T14))) → U8_ga(T14, halfc24_in_ga(T14))
U8_ga(T14, halfc24_out_ga(T14, X31)) → halfc24_out_ga(s(s(T14)), s(X31))
The set Q consists of the following terms:
halfc24_in_ga(x0)
U8_ga(x0, x1)
We have to consider all (P,Q,R)-chains.
(19) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.
(20) TRUE