(0) Obligation:
Clauses:
log2(X, Y) :- log2(X, 0, Y).
log2(0, I, I).
log2(s(0), I, I).
log2(s(s(X)), I, Y) :- ','(half(s(s(X)), X1), log2(X1, s(I), Y)).
half(0, 0).
half(s(0), 0).
half(s(s(X)), s(Y)) :- half(X, Y).
Queries:
log2(a,g).
(1) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
log2_in: (f,b)
log2_in: (f,b,b) (b,b,b)
half_in: (f,f) (b,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(2) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
(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:
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_agg(X, 0, Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGG(X, 0, Y)
LOG2_IN_AGG(s(s(X)), I, Y) → U2_AGG(X, I, Y, half_in_aa(s(s(X)), X1))
LOG2_IN_AGG(s(s(X)), I, Y) → HALF_IN_AA(s(s(X)), X1)
HALF_IN_AA(s(s(X)), s(Y)) → U4_AA(X, Y, half_in_aa(X, Y))
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_AGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
LOG2_IN_GGG(s(s(X)), I, Y) → HALF_IN_GA(s(s(X)), X1)
HALF_IN_GA(s(s(X)), s(Y)) → U4_GA(X, Y, half_in_ga(X, Y))
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_GGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
LOG2_IN_AG(
x1,
x2) =
LOG2_IN_AG(
x2)
U1_AG(
x1,
x2,
x3) =
U1_AG(
x3)
LOG2_IN_AGG(
x1,
x2,
x3) =
LOG2_IN_AGG(
x2,
x3)
U2_AGG(
x1,
x2,
x3,
x4) =
U2_AGG(
x2,
x3,
x4)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
U4_AA(
x1,
x2,
x3) =
U4_AA(
x3)
U3_AGG(
x1,
x2,
x3,
x4) =
U3_AGG(
x1,
x4)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x2,
x3,
x4)
HALF_IN_GA(
x1,
x2) =
HALF_IN_GA(
x1)
U4_GA(
x1,
x2,
x3) =
U4_GA(
x3)
U3_GGG(
x1,
x2,
x3,
x4) =
U3_GGG(
x4)
We have to consider all (P,R,Pi)-chains
(4) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_agg(X, 0, Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGG(X, 0, Y)
LOG2_IN_AGG(s(s(X)), I, Y) → U2_AGG(X, I, Y, half_in_aa(s(s(X)), X1))
LOG2_IN_AGG(s(s(X)), I, Y) → HALF_IN_AA(s(s(X)), X1)
HALF_IN_AA(s(s(X)), s(Y)) → U4_AA(X, Y, half_in_aa(X, Y))
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_AGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
LOG2_IN_GGG(s(s(X)), I, Y) → HALF_IN_GA(s(s(X)), X1)
HALF_IN_GA(s(s(X)), s(Y)) → U4_GA(X, Y, half_in_ga(X, Y))
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_GGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
LOG2_IN_AG(
x1,
x2) =
LOG2_IN_AG(
x2)
U1_AG(
x1,
x2,
x3) =
U1_AG(
x3)
LOG2_IN_AGG(
x1,
x2,
x3) =
LOG2_IN_AGG(
x2,
x3)
U2_AGG(
x1,
x2,
x3,
x4) =
U2_AGG(
x2,
x3,
x4)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
U4_AA(
x1,
x2,
x3) =
U4_AA(
x3)
U3_AGG(
x1,
x2,
x3,
x4) =
U3_AGG(
x1,
x4)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x2,
x3,
x4)
HALF_IN_GA(
x1,
x2) =
HALF_IN_GA(
x1)
U4_GA(
x1,
x2,
x3) =
U4_GA(
x3)
U3_GGG(
x1,
x2,
x3,
x4) =
U3_GGG(
x4)
We have to consider all (P,R,Pi)-chains
(5) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 10 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
HALF_IN_GA(
x1,
x2) =
HALF_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:
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
HALF_IN_GA(
x1,
x2) =
HALF_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:
HALF_IN_GA(s(s(X))) → HALF_IN_GA(X)
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:
- HALF_IN_GA(s(s(X))) → HALF_IN_GA(X)
The graph contains the following edges 1 > 1
(13) TRUE
(14) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x2,
x3,
x4)
We have to consider all (P,R,Pi)-chains
(15) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(16) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
The TRS R consists of the following rules:
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
0 =
0
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x2,
x3,
x4)
We have to consider all (P,R,Pi)-chains
(17) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(18) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GGG(I, Y, half_out_ga(X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(I, Y, half_in_ga(s(s(X))))
The TRS R consists of the following rules:
half_in_ga(s(s(X))) → U4_ga(half_in_ga(X))
U4_ga(half_out_ga(Y)) → half_out_ga(s(Y))
half_in_ga(0) → half_out_ga(0)
half_in_ga(s(0)) → half_out_ga(0)
The set Q consists of the following terms:
half_in_ga(x0)
U4_ga(x0)
We have to consider all (P,Q,R)-chains.
(19) 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:
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(I, Y, half_in_ga(s(s(X))))
Strictly oriented rules of the TRS R:
half_in_ga(s(0)) → half_out_ga(0)
Used ordering: Polynomial interpretation [POLO]:
POL(0) = 0
POL(LOG2_IN_GGG(x1, x2, x3)) = 2·x1 + x2 + x3
POL(U2_GGG(x1, x2, x3)) = 1 + x1 + x2 + x3
POL(U4_ga(x1)) = 2 + x1
POL(half_in_ga(x1)) = x1
POL(half_out_ga(x1)) = 2·x1
POL(s(x1)) = 1 + x1
(20) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GGG(I, Y, half_out_ga(X1)) → LOG2_IN_GGG(X1, s(I), Y)
The TRS R consists of the following rules:
half_in_ga(s(s(X))) → U4_ga(half_in_ga(X))
U4_ga(half_out_ga(Y)) → half_out_ga(s(Y))
half_in_ga(0) → half_out_ga(0)
The set Q consists of the following terms:
half_in_ga(x0)
U4_ga(x0)
We have to consider all (P,Q,R)-chains.
(21) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.
(22) TRUE
(23) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
We have to consider all (P,R,Pi)-chains
(24) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(25) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
We have to consider all (P,R,Pi)-chains
(26) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(27) Obligation:
Q DP problem:
The TRS P consists of the following rules:
HALF_IN_AA → HALF_IN_AA
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(28) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.
s =
HALF_IN_AA evaluates to t =
HALF_IN_AAThus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Matcher: [ ]
- Semiunifier: [ ]
Rewriting sequenceThe DP semiunifies directly so there is only one rewrite step from HALF_IN_AA to HALF_IN_AA.
(29) FALSE
(30) PrologToPiTRSProof (SOUND transformation)
We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
log2_in: (f,b)
log2_in: (f,b,b) (b,b,b)
half_in: (f,f) (b,f)
Transforming
Prolog into the following
Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
(31) Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
(32) 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:
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_agg(X, 0, Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGG(X, 0, Y)
LOG2_IN_AGG(s(s(X)), I, Y) → U2_AGG(X, I, Y, half_in_aa(s(s(X)), X1))
LOG2_IN_AGG(s(s(X)), I, Y) → HALF_IN_AA(s(s(X)), X1)
HALF_IN_AA(s(s(X)), s(Y)) → U4_AA(X, Y, half_in_aa(X, Y))
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_AGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
LOG2_IN_GGG(s(s(X)), I, Y) → HALF_IN_GA(s(s(X)), X1)
HALF_IN_GA(s(s(X)), s(Y)) → U4_GA(X, Y, half_in_ga(X, Y))
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_GGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
LOG2_IN_AG(
x1,
x2) =
LOG2_IN_AG(
x2)
U1_AG(
x1,
x2,
x3) =
U1_AG(
x2,
x3)
LOG2_IN_AGG(
x1,
x2,
x3) =
LOG2_IN_AGG(
x2,
x3)
U2_AGG(
x1,
x2,
x3,
x4) =
U2_AGG(
x2,
x3,
x4)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
U4_AA(
x1,
x2,
x3) =
U4_AA(
x3)
U3_AGG(
x1,
x2,
x3,
x4) =
U3_AGG(
x1,
x2,
x3,
x4)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x1,
x2,
x3,
x4)
HALF_IN_GA(
x1,
x2) =
HALF_IN_GA(
x1)
U4_GA(
x1,
x2,
x3) =
U4_GA(
x1,
x3)
U3_GGG(
x1,
x2,
x3,
x4) =
U3_GGG(
x1,
x2,
x3,
x4)
We have to consider all (P,R,Pi)-chains
(33) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
LOG2_IN_AG(X, Y) → U1_AG(X, Y, log2_in_agg(X, 0, Y))
LOG2_IN_AG(X, Y) → LOG2_IN_AGG(X, 0, Y)
LOG2_IN_AGG(s(s(X)), I, Y) → U2_AGG(X, I, Y, half_in_aa(s(s(X)), X1))
LOG2_IN_AGG(s(s(X)), I, Y) → HALF_IN_AA(s(s(X)), X1)
HALF_IN_AA(s(s(X)), s(Y)) → U4_AA(X, Y, half_in_aa(X, Y))
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_AGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_AGG(X, I, Y, half_out_aa(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
LOG2_IN_GGG(s(s(X)), I, Y) → HALF_IN_GA(s(s(X)), X1)
HALF_IN_GA(s(s(X)), s(Y)) → U4_GA(X, Y, half_in_ga(X, Y))
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_GGG(X, I, Y, log2_in_ggg(X1, s(I), Y))
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
LOG2_IN_AG(
x1,
x2) =
LOG2_IN_AG(
x2)
U1_AG(
x1,
x2,
x3) =
U1_AG(
x2,
x3)
LOG2_IN_AGG(
x1,
x2,
x3) =
LOG2_IN_AGG(
x2,
x3)
U2_AGG(
x1,
x2,
x3,
x4) =
U2_AGG(
x2,
x3,
x4)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
U4_AA(
x1,
x2,
x3) =
U4_AA(
x3)
U3_AGG(
x1,
x2,
x3,
x4) =
U3_AGG(
x1,
x2,
x3,
x4)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x1,
x2,
x3,
x4)
HALF_IN_GA(
x1,
x2) =
HALF_IN_GA(
x1)
U4_GA(
x1,
x2,
x3) =
U4_GA(
x1,
x3)
U3_GGG(
x1,
x2,
x3,
x4) =
U3_GGG(
x1,
x2,
x3,
x4)
We have to consider all (P,R,Pi)-chains
(34) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 10 less nodes.
(35) Complex Obligation (AND)
(36) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
HALF_IN_GA(
x1,
x2) =
HALF_IN_GA(
x1)
We have to consider all (P,R,Pi)-chains
(37) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(38) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_GA(s(s(X)), s(Y)) → HALF_IN_GA(X, Y)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
HALF_IN_GA(
x1,
x2) =
HALF_IN_GA(
x1)
We have to consider all (P,R,Pi)-chains
(39) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(40) Obligation:
Q DP problem:
The TRS P consists of the following rules:
HALF_IN_GA(s(s(X))) → HALF_IN_GA(X)
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(41) 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:
- HALF_IN_GA(s(s(X))) → HALF_IN_GA(X)
The graph contains the following edges 1 > 1
(42) TRUE
(43) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x1,
x2,
x3,
x4)
We have to consider all (P,R,Pi)-chains
(44) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(45) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X)), X1))
The TRS R consists of the following rules:
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
0 =
0
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
LOG2_IN_GGG(
x1,
x2,
x3) =
LOG2_IN_GGG(
x1,
x2,
x3)
U2_GGG(
x1,
x2,
x3,
x4) =
U2_GGG(
x1,
x2,
x3,
x4)
We have to consider all (P,R,Pi)-chains
(46) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(47) Obligation:
Q DP problem:
The TRS P consists of the following rules:
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X))))
The TRS R consists of the following rules:
half_in_ga(s(s(X))) → U4_ga(X, half_in_ga(X))
U4_ga(X, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
half_in_ga(0) → half_out_ga(0, 0)
half_in_ga(s(0)) → half_out_ga(s(0), 0)
The set Q consists of the following terms:
half_in_ga(x0)
U4_ga(x0, x1)
We have to consider all (P,Q,R)-chains.
(48) QDPOrderProof (EQUIVALENT transformation)
We use the reduction pair processor [LPAR04].
The following pairs can be oriented strictly and are deleted.
U2_GGG(X, I, Y, half_out_ga(s(s(X)), X1)) → LOG2_IN_GGG(X1, s(I), Y)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:
POL(U2_GGG(x1, x2, x3, x4)) = | 1 | + | | · | x1 | + | | · | x2 | + | | · | x3 | + | | · | x4 |
POL(half_out_ga(x1, x2)) = | | + | | · | x1 | + | | · | x2 |
POL(LOG2_IN_GGG(x1, x2, x3)) = | 0 | + | | · | x1 | + | | · | x2 | + | | · | x3 |
POL(half_in_ga(x1)) = | | + | | · | x1 |
POL(U4_ga(x1, x2)) = | | + | | · | x1 | + | | · | x2 |
The following usable rules [FROCOS05] were oriented:
half_in_ga(s(s(X))) → U4_ga(X, half_in_ga(X))
half_in_ga(0) → half_out_ga(0, 0)
half_in_ga(s(0)) → half_out_ga(s(0), 0)
U4_ga(X, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
(49) Obligation:
Q DP problem:
The TRS P consists of the following rules:
LOG2_IN_GGG(s(s(X)), I, Y) → U2_GGG(X, I, Y, half_in_ga(s(s(X))))
The TRS R consists of the following rules:
half_in_ga(s(s(X))) → U4_ga(X, half_in_ga(X))
U4_ga(X, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
half_in_ga(0) → half_out_ga(0, 0)
half_in_ga(s(0)) → half_out_ga(s(0), 0)
The set Q consists of the following terms:
half_in_ga(x0)
U4_ga(x0, x1)
We have to consider all (P,Q,R)-chains.
(50) DependencyGraphProof (EQUIVALENT transformation)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 0 SCCs with 1 less node.
(51) TRUE
(52) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
The TRS R consists of the following rules:
log2_in_ag(X, Y) → U1_ag(X, Y, log2_in_agg(X, 0, Y))
log2_in_agg(0, I, I) → log2_out_agg(0, I, I)
log2_in_agg(s(0), I, I) → log2_out_agg(s(0), I, I)
log2_in_agg(s(s(X)), I, Y) → U2_agg(X, I, Y, half_in_aa(s(s(X)), X1))
half_in_aa(0, 0) → half_out_aa(0, 0)
half_in_aa(s(0), 0) → half_out_aa(s(0), 0)
half_in_aa(s(s(X)), s(Y)) → U4_aa(X, Y, half_in_aa(X, Y))
U4_aa(X, Y, half_out_aa(X, Y)) → half_out_aa(s(s(X)), s(Y))
U2_agg(X, I, Y, half_out_aa(s(s(X)), X1)) → U3_agg(X, I, Y, log2_in_ggg(X1, s(I), Y))
log2_in_ggg(0, I, I) → log2_out_ggg(0, I, I)
log2_in_ggg(s(0), I, I) → log2_out_ggg(s(0), I, I)
log2_in_ggg(s(s(X)), I, Y) → U2_ggg(X, I, Y, half_in_ga(s(s(X)), X1))
half_in_ga(0, 0) → half_out_ga(0, 0)
half_in_ga(s(0), 0) → half_out_ga(s(0), 0)
half_in_ga(s(s(X)), s(Y)) → U4_ga(X, Y, half_in_ga(X, Y))
U4_ga(X, Y, half_out_ga(X, Y)) → half_out_ga(s(s(X)), s(Y))
U2_ggg(X, I, Y, half_out_ga(s(s(X)), X1)) → U3_ggg(X, I, Y, log2_in_ggg(X1, s(I), Y))
U3_ggg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_ggg(s(s(X)), I, Y)
U3_agg(X, I, Y, log2_out_ggg(X1, s(I), Y)) → log2_out_agg(s(s(X)), I, Y)
U1_ag(X, Y, log2_out_agg(X, 0, Y)) → log2_out_ag(X, Y)
The argument filtering Pi contains the following mapping:
log2_in_ag(
x1,
x2) =
log2_in_ag(
x2)
U1_ag(
x1,
x2,
x3) =
U1_ag(
x2,
x3)
log2_in_agg(
x1,
x2,
x3) =
log2_in_agg(
x2,
x3)
log2_out_agg(
x1,
x2,
x3) =
log2_out_agg(
x1,
x2,
x3)
U2_agg(
x1,
x2,
x3,
x4) =
U2_agg(
x2,
x3,
x4)
half_in_aa(
x1,
x2) =
half_in_aa
half_out_aa(
x1,
x2) =
half_out_aa(
x1,
x2)
U4_aa(
x1,
x2,
x3) =
U4_aa(
x3)
s(
x1) =
s(
x1)
U3_agg(
x1,
x2,
x3,
x4) =
U3_agg(
x1,
x2,
x3,
x4)
log2_in_ggg(
x1,
x2,
x3) =
log2_in_ggg(
x1,
x2,
x3)
0 =
0
log2_out_ggg(
x1,
x2,
x3) =
log2_out_ggg(
x1,
x2,
x3)
U2_ggg(
x1,
x2,
x3,
x4) =
U2_ggg(
x1,
x2,
x3,
x4)
half_in_ga(
x1,
x2) =
half_in_ga(
x1)
half_out_ga(
x1,
x2) =
half_out_ga(
x1,
x2)
U4_ga(
x1,
x2,
x3) =
U4_ga(
x1,
x3)
U3_ggg(
x1,
x2,
x3,
x4) =
U3_ggg(
x1,
x2,
x3,
x4)
log2_out_ag(
x1,
x2) =
log2_out_ag(
x1,
x2)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
We have to consider all (P,R,Pi)-chains
(53) UsableRulesProof (EQUIVALENT transformation)
For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.
(54) Obligation:
Pi DP problem:
The TRS P consists of the following rules:
HALF_IN_AA(s(s(X)), s(Y)) → HALF_IN_AA(X, Y)
R is empty.
The argument filtering Pi contains the following mapping:
s(
x1) =
s(
x1)
HALF_IN_AA(
x1,
x2) =
HALF_IN_AA
We have to consider all (P,R,Pi)-chains
(55) PiDPToQDPProof (SOUND transformation)
Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.
(56) Obligation:
Q DP problem:
The TRS P consists of the following rules:
HALF_IN_AA → HALF_IN_AA
R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
(57) NonTerminationProof (EQUIVALENT transformation)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.
s =
HALF_IN_AA evaluates to t =
HALF_IN_AAThus s starts an infinite chain as s semiunifies with t with the following substitutions:
- Semiunifier: [ ]
- Matcher: [ ]
Rewriting sequenceThe DP semiunifies directly so there is only one rewrite step from HALF_IN_AA to HALF_IN_AA.
(58) FALSE