(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(g,a).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

half22(s(s(T23)), s(X55)) :- half22(T23, X55).
half17(T20, s(X46)) :- half22(T20, X46).
p139(T88, X286, T92, T90) :- half17(T88, X286).
p139(T88, s(s(T114)), T115, T117) :- ','(halfc17(T88, s(s(T114))), p139(T114, X323, s(T115), T117)).
log21(s(s(T12)), T14) :- half17(T12, X28).
log21(s(s(T12)), T30) :- ','(halfc17(T12, s(s(T28))), half17(T28, X82)).
log21(s(s(T12)), T40) :- ','(halfc17(T12, s(s(T28))), ','(halfc17(T28, s(s(T38))), half17(T38, X116))).
log21(s(s(T12)), T50) :- ','(halfc17(T12, s(s(T28))), ','(halfc17(T28, s(s(T38))), ','(halfc17(T38, s(s(T48))), half17(T48, X150)))).
log21(s(s(T12)), T60) :- ','(halfc17(T12, s(s(T28))), ','(halfc17(T28, s(s(T38))), ','(halfc17(T38, s(s(T48))), ','(halfc17(T48, s(s(T58))), half17(T58, X184))))).
log21(s(s(T12)), T70) :- ','(halfc17(T12, s(s(T28))), ','(halfc17(T28, s(s(T38))), ','(halfc17(T38, s(s(T48))), ','(halfc17(T48, s(s(T58))), ','(halfc17(T58, s(s(T68))), half17(T68, X218)))))).
log21(s(s(T12)), T80) :- ','(halfc17(T12, s(s(T28))), ','(halfc17(T28, s(s(T38))), ','(halfc17(T38, s(s(T48))), ','(halfc17(T48, s(s(T58))), ','(halfc17(T58, s(s(T68))), ','(halfc17(T68, s(s(T78))), half17(T78, X252))))))).
log21(s(s(T12)), T90) :- ','(halfc17(T12, s(s(T28))), ','(halfc17(T28, s(s(T38))), ','(halfc17(T38, s(s(T48))), ','(halfc17(T48, s(s(T58))), ','(halfc17(T58, s(s(T68))), ','(halfc17(T68, s(s(T78))), ','(halfc17(T78, s(s(T88))), p139(T88, X286, s(s(s(s(s(s(s(0))))))), T90)))))))).

Clauses:

halfc22(0, 0).
halfc22(s(0), 0).
halfc22(s(s(T23)), s(X55)) :- halfc22(T23, X55).
halfc17(T20, s(X46)) :- halfc22(T20, X46).
qc139(T88, 0, T102, s(T102)) :- halfc17(T88, 0).
qc139(T88, s(0), T107, s(T107)) :- halfc17(T88, s(0)).
qc139(T88, s(s(T114)), T115, T117) :- ','(halfc17(T88, s(s(T114))), qc139(T114, X323, s(T115), T117)).

Afs:

log21(x1, x2)  =  log21(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:
log21_in: (b,f)
half17_in: (b,f)
half22_in: (b,f)
halfc17_in: (b,f)
halfc22_in: (b,f)
p139_in: (b,f,b,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

LOG21_IN_GA(s(s(T12)), T14) → U6_GA(T12, T14, half17_in_ga(T12, X28))
LOG21_IN_GA(s(s(T12)), T14) → HALF17_IN_GA(T12, X28)
HALF17_IN_GA(T20, s(X46)) → U2_GA(T20, X46, half22_in_ga(T20, X46))
HALF17_IN_GA(T20, s(X46)) → HALF22_IN_GA(T20, X46)
HALF22_IN_GA(s(s(T23)), s(X55)) → U1_GA(T23, X55, half22_in_ga(T23, X55))
HALF22_IN_GA(s(s(T23)), s(X55)) → HALF22_IN_GA(T23, X55)
LOG21_IN_GA(s(s(T12)), T30) → U7_GA(T12, T30, halfc17_in_ga(T12, s(s(T28))))
U7_GA(T12, T30, halfc17_out_ga(T12, s(s(T28)))) → U8_GA(T12, T30, half17_in_ga(T28, X82))
U7_GA(T12, T30, halfc17_out_ga(T12, s(s(T28)))) → HALF17_IN_GA(T28, X82)
LOG21_IN_GA(s(s(T12)), T40) → U9_GA(T12, T40, halfc17_in_ga(T12, s(s(T28))))
U9_GA(T12, T40, halfc17_out_ga(T12, s(s(T28)))) → U10_GA(T12, T40, halfc17_in_ga(T28, s(s(T38))))
U10_GA(T12, T40, halfc17_out_ga(T28, s(s(T38)))) → U11_GA(T12, T40, half17_in_ga(T38, X116))
U10_GA(T12, T40, halfc17_out_ga(T28, s(s(T38)))) → HALF17_IN_GA(T38, X116)
LOG21_IN_GA(s(s(T12)), T50) → U12_GA(T12, T50, halfc17_in_ga(T12, s(s(T28))))
U12_GA(T12, T50, halfc17_out_ga(T12, s(s(T28)))) → U13_GA(T12, T50, halfc17_in_ga(T28, s(s(T38))))
U13_GA(T12, T50, halfc17_out_ga(T28, s(s(T38)))) → U14_GA(T12, T50, halfc17_in_ga(T38, s(s(T48))))
U14_GA(T12, T50, halfc17_out_ga(T38, s(s(T48)))) → U15_GA(T12, T50, half17_in_ga(T48, X150))
U14_GA(T12, T50, halfc17_out_ga(T38, s(s(T48)))) → HALF17_IN_GA(T48, X150)
LOG21_IN_GA(s(s(T12)), T60) → U16_GA(T12, T60, halfc17_in_ga(T12, s(s(T28))))
U16_GA(T12, T60, halfc17_out_ga(T12, s(s(T28)))) → U17_GA(T12, T60, halfc17_in_ga(T28, s(s(T38))))
U17_GA(T12, T60, halfc17_out_ga(T28, s(s(T38)))) → U18_GA(T12, T60, halfc17_in_ga(T38, s(s(T48))))
U18_GA(T12, T60, halfc17_out_ga(T38, s(s(T48)))) → U19_GA(T12, T60, halfc17_in_ga(T48, s(s(T58))))
U19_GA(T12, T60, halfc17_out_ga(T48, s(s(T58)))) → U20_GA(T12, T60, half17_in_ga(T58, X184))
U19_GA(T12, T60, halfc17_out_ga(T48, s(s(T58)))) → HALF17_IN_GA(T58, X184)
LOG21_IN_GA(s(s(T12)), T70) → U21_GA(T12, T70, halfc17_in_ga(T12, s(s(T28))))
U21_GA(T12, T70, halfc17_out_ga(T12, s(s(T28)))) → U22_GA(T12, T70, halfc17_in_ga(T28, s(s(T38))))
U22_GA(T12, T70, halfc17_out_ga(T28, s(s(T38)))) → U23_GA(T12, T70, halfc17_in_ga(T38, s(s(T48))))
U23_GA(T12, T70, halfc17_out_ga(T38, s(s(T48)))) → U24_GA(T12, T70, halfc17_in_ga(T48, s(s(T58))))
U24_GA(T12, T70, halfc17_out_ga(T48, s(s(T58)))) → U25_GA(T12, T70, halfc17_in_ga(T58, s(s(T68))))
U25_GA(T12, T70, halfc17_out_ga(T58, s(s(T68)))) → U26_GA(T12, T70, half17_in_ga(T68, X218))
U25_GA(T12, T70, halfc17_out_ga(T58, s(s(T68)))) → HALF17_IN_GA(T68, X218)
LOG21_IN_GA(s(s(T12)), T80) → U27_GA(T12, T80, halfc17_in_ga(T12, s(s(T28))))
U27_GA(T12, T80, halfc17_out_ga(T12, s(s(T28)))) → U28_GA(T12, T80, halfc17_in_ga(T28, s(s(T38))))
U28_GA(T12, T80, halfc17_out_ga(T28, s(s(T38)))) → U29_GA(T12, T80, halfc17_in_ga(T38, s(s(T48))))
U29_GA(T12, T80, halfc17_out_ga(T38, s(s(T48)))) → U30_GA(T12, T80, halfc17_in_ga(T48, s(s(T58))))
U30_GA(T12, T80, halfc17_out_ga(T48, s(s(T58)))) → U31_GA(T12, T80, halfc17_in_ga(T58, s(s(T68))))
U31_GA(T12, T80, halfc17_out_ga(T58, s(s(T68)))) → U32_GA(T12, T80, halfc17_in_ga(T68, s(s(T78))))
U32_GA(T12, T80, halfc17_out_ga(T68, s(s(T78)))) → U33_GA(T12, T80, half17_in_ga(T78, X252))
U32_GA(T12, T80, halfc17_out_ga(T68, s(s(T78)))) → HALF17_IN_GA(T78, X252)
LOG21_IN_GA(s(s(T12)), T90) → U34_GA(T12, T90, halfc17_in_ga(T12, s(s(T28))))
U34_GA(T12, T90, halfc17_out_ga(T12, s(s(T28)))) → U35_GA(T12, T90, halfc17_in_ga(T28, s(s(T38))))
U35_GA(T12, T90, halfc17_out_ga(T28, s(s(T38)))) → U36_GA(T12, T90, halfc17_in_ga(T38, s(s(T48))))
U36_GA(T12, T90, halfc17_out_ga(T38, s(s(T48)))) → U37_GA(T12, T90, halfc17_in_ga(T48, s(s(T58))))
U37_GA(T12, T90, halfc17_out_ga(T48, s(s(T58)))) → U38_GA(T12, T90, halfc17_in_ga(T58, s(s(T68))))
U38_GA(T12, T90, halfc17_out_ga(T58, s(s(T68)))) → U39_GA(T12, T90, halfc17_in_ga(T68, s(s(T78))))
U39_GA(T12, T90, halfc17_out_ga(T68, s(s(T78)))) → U40_GA(T12, T90, halfc17_in_ga(T78, s(s(T88))))
U40_GA(T12, T90, halfc17_out_ga(T78, s(s(T88)))) → U41_GA(T12, T90, p139_in_gaga(T88, X286, s(s(s(s(s(s(s(0))))))), T90))
U40_GA(T12, T90, halfc17_out_ga(T78, s(s(T88)))) → P139_IN_GAGA(T88, X286, s(s(s(s(s(s(s(0))))))), T90)
P139_IN_GAGA(T88, X286, T92, T90) → U3_GAGA(T88, X286, T92, T90, half17_in_ga(T88, X286))
P139_IN_GAGA(T88, X286, T92, T90) → HALF17_IN_GA(T88, X286)
P139_IN_GAGA(T88, s(s(T114)), T115, T117) → U4_GAGA(T88, T114, T115, T117, halfc17_in_ga(T88, s(s(T114))))
U4_GAGA(T88, T114, T115, T117, halfc17_out_ga(T88, s(s(T114)))) → U5_GAGA(T88, T114, T115, T117, p139_in_gaga(T114, X323, s(T115), T117))
U4_GAGA(T88, T114, T115, T117, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, X323, s(T115), T117)

The TRS R consists of the following rules:

halfc17_in_ga(T20, s(X46)) → U44_ga(T20, X46, halfc22_in_ga(T20, X46))
halfc22_in_ga(0, 0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0), 0) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23)), s(X55)) → U43_ga(T23, X55, halfc22_in_ga(T23, X55))
U43_ga(T23, X55, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))
U44_ga(T20, X46, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
half17_in_ga(x1, x2)  =  half17_in_ga(x1)
half22_in_ga(x1, x2)  =  half22_in_ga(x1)
halfc17_in_ga(x1, x2)  =  halfc17_in_ga(x1)
U44_ga(x1, x2, x3)  =  U44_ga(x1, x3)
halfc22_in_ga(x1, x2)  =  halfc22_in_ga(x1)
0  =  0
halfc22_out_ga(x1, x2)  =  halfc22_out_ga(x1, x2)
U43_ga(x1, x2, x3)  =  U43_ga(x1, x3)
halfc17_out_ga(x1, x2)  =  halfc17_out_ga(x1, x2)
p139_in_gaga(x1, x2, x3, x4)  =  p139_in_gaga(x1, x3)
LOG21_IN_GA(x1, x2)  =  LOG21_IN_GA(x1)
U6_GA(x1, x2, x3)  =  U6_GA(x1, x3)
HALF17_IN_GA(x1, x2)  =  HALF17_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HALF22_IN_GA(x1, x2)  =  HALF22_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
U7_GA(x1, x2, x3)  =  U7_GA(x1, x3)
U8_GA(x1, x2, x3)  =  U8_GA(x1, x3)
U9_GA(x1, x2, x3)  =  U9_GA(x1, x3)
U10_GA(x1, x2, x3)  =  U10_GA(x1, x3)
U11_GA(x1, x2, x3)  =  U11_GA(x1, x3)
U12_GA(x1, x2, x3)  =  U12_GA(x1, x3)
U13_GA(x1, x2, x3)  =  U13_GA(x1, x3)
U14_GA(x1, x2, x3)  =  U14_GA(x1, x3)
U15_GA(x1, x2, x3)  =  U15_GA(x1, x3)
U16_GA(x1, x2, x3)  =  U16_GA(x1, x3)
U17_GA(x1, x2, x3)  =  U17_GA(x1, x3)
U18_GA(x1, x2, x3)  =  U18_GA(x1, x3)
U19_GA(x1, x2, x3)  =  U19_GA(x1, x3)
U20_GA(x1, x2, x3)  =  U20_GA(x1, x3)
U21_GA(x1, x2, x3)  =  U21_GA(x1, x3)
U22_GA(x1, x2, x3)  =  U22_GA(x1, x3)
U23_GA(x1, x2, x3)  =  U23_GA(x1, x3)
U24_GA(x1, x2, x3)  =  U24_GA(x1, x3)
U25_GA(x1, x2, x3)  =  U25_GA(x1, x3)
U26_GA(x1, x2, x3)  =  U26_GA(x1, x3)
U27_GA(x1, x2, x3)  =  U27_GA(x1, x3)
U28_GA(x1, x2, x3)  =  U28_GA(x1, x3)
U29_GA(x1, x2, x3)  =  U29_GA(x1, x3)
U30_GA(x1, x2, x3)  =  U30_GA(x1, x3)
U31_GA(x1, x2, x3)  =  U31_GA(x1, x3)
U32_GA(x1, x2, x3)  =  U32_GA(x1, x3)
U33_GA(x1, x2, x3)  =  U33_GA(x1, x3)
U34_GA(x1, x2, x3)  =  U34_GA(x1, x3)
U35_GA(x1, x2, x3)  =  U35_GA(x1, x3)
U36_GA(x1, x2, x3)  =  U36_GA(x1, x3)
U37_GA(x1, x2, x3)  =  U37_GA(x1, x3)
U38_GA(x1, x2, x3)  =  U38_GA(x1, x3)
U39_GA(x1, x2, x3)  =  U39_GA(x1, x3)
U40_GA(x1, x2, x3)  =  U40_GA(x1, x3)
U41_GA(x1, x2, x3)  =  U41_GA(x1, x3)
P139_IN_GAGA(x1, x2, x3, x4)  =  P139_IN_GAGA(x1, x3)
U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)
U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)
U5_GAGA(x1, x2, x3, x4, x5)  =  U5_GAGA(x1, x2, x3, x5)

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:

LOG21_IN_GA(s(s(T12)), T14) → U6_GA(T12, T14, half17_in_ga(T12, X28))
LOG21_IN_GA(s(s(T12)), T14) → HALF17_IN_GA(T12, X28)
HALF17_IN_GA(T20, s(X46)) → U2_GA(T20, X46, half22_in_ga(T20, X46))
HALF17_IN_GA(T20, s(X46)) → HALF22_IN_GA(T20, X46)
HALF22_IN_GA(s(s(T23)), s(X55)) → U1_GA(T23, X55, half22_in_ga(T23, X55))
HALF22_IN_GA(s(s(T23)), s(X55)) → HALF22_IN_GA(T23, X55)
LOG21_IN_GA(s(s(T12)), T30) → U7_GA(T12, T30, halfc17_in_ga(T12, s(s(T28))))
U7_GA(T12, T30, halfc17_out_ga(T12, s(s(T28)))) → U8_GA(T12, T30, half17_in_ga(T28, X82))
U7_GA(T12, T30, halfc17_out_ga(T12, s(s(T28)))) → HALF17_IN_GA(T28, X82)
LOG21_IN_GA(s(s(T12)), T40) → U9_GA(T12, T40, halfc17_in_ga(T12, s(s(T28))))
U9_GA(T12, T40, halfc17_out_ga(T12, s(s(T28)))) → U10_GA(T12, T40, halfc17_in_ga(T28, s(s(T38))))
U10_GA(T12, T40, halfc17_out_ga(T28, s(s(T38)))) → U11_GA(T12, T40, half17_in_ga(T38, X116))
U10_GA(T12, T40, halfc17_out_ga(T28, s(s(T38)))) → HALF17_IN_GA(T38, X116)
LOG21_IN_GA(s(s(T12)), T50) → U12_GA(T12, T50, halfc17_in_ga(T12, s(s(T28))))
U12_GA(T12, T50, halfc17_out_ga(T12, s(s(T28)))) → U13_GA(T12, T50, halfc17_in_ga(T28, s(s(T38))))
U13_GA(T12, T50, halfc17_out_ga(T28, s(s(T38)))) → U14_GA(T12, T50, halfc17_in_ga(T38, s(s(T48))))
U14_GA(T12, T50, halfc17_out_ga(T38, s(s(T48)))) → U15_GA(T12, T50, half17_in_ga(T48, X150))
U14_GA(T12, T50, halfc17_out_ga(T38, s(s(T48)))) → HALF17_IN_GA(T48, X150)
LOG21_IN_GA(s(s(T12)), T60) → U16_GA(T12, T60, halfc17_in_ga(T12, s(s(T28))))
U16_GA(T12, T60, halfc17_out_ga(T12, s(s(T28)))) → U17_GA(T12, T60, halfc17_in_ga(T28, s(s(T38))))
U17_GA(T12, T60, halfc17_out_ga(T28, s(s(T38)))) → U18_GA(T12, T60, halfc17_in_ga(T38, s(s(T48))))
U18_GA(T12, T60, halfc17_out_ga(T38, s(s(T48)))) → U19_GA(T12, T60, halfc17_in_ga(T48, s(s(T58))))
U19_GA(T12, T60, halfc17_out_ga(T48, s(s(T58)))) → U20_GA(T12, T60, half17_in_ga(T58, X184))
U19_GA(T12, T60, halfc17_out_ga(T48, s(s(T58)))) → HALF17_IN_GA(T58, X184)
LOG21_IN_GA(s(s(T12)), T70) → U21_GA(T12, T70, halfc17_in_ga(T12, s(s(T28))))
U21_GA(T12, T70, halfc17_out_ga(T12, s(s(T28)))) → U22_GA(T12, T70, halfc17_in_ga(T28, s(s(T38))))
U22_GA(T12, T70, halfc17_out_ga(T28, s(s(T38)))) → U23_GA(T12, T70, halfc17_in_ga(T38, s(s(T48))))
U23_GA(T12, T70, halfc17_out_ga(T38, s(s(T48)))) → U24_GA(T12, T70, halfc17_in_ga(T48, s(s(T58))))
U24_GA(T12, T70, halfc17_out_ga(T48, s(s(T58)))) → U25_GA(T12, T70, halfc17_in_ga(T58, s(s(T68))))
U25_GA(T12, T70, halfc17_out_ga(T58, s(s(T68)))) → U26_GA(T12, T70, half17_in_ga(T68, X218))
U25_GA(T12, T70, halfc17_out_ga(T58, s(s(T68)))) → HALF17_IN_GA(T68, X218)
LOG21_IN_GA(s(s(T12)), T80) → U27_GA(T12, T80, halfc17_in_ga(T12, s(s(T28))))
U27_GA(T12, T80, halfc17_out_ga(T12, s(s(T28)))) → U28_GA(T12, T80, halfc17_in_ga(T28, s(s(T38))))
U28_GA(T12, T80, halfc17_out_ga(T28, s(s(T38)))) → U29_GA(T12, T80, halfc17_in_ga(T38, s(s(T48))))
U29_GA(T12, T80, halfc17_out_ga(T38, s(s(T48)))) → U30_GA(T12, T80, halfc17_in_ga(T48, s(s(T58))))
U30_GA(T12, T80, halfc17_out_ga(T48, s(s(T58)))) → U31_GA(T12, T80, halfc17_in_ga(T58, s(s(T68))))
U31_GA(T12, T80, halfc17_out_ga(T58, s(s(T68)))) → U32_GA(T12, T80, halfc17_in_ga(T68, s(s(T78))))
U32_GA(T12, T80, halfc17_out_ga(T68, s(s(T78)))) → U33_GA(T12, T80, half17_in_ga(T78, X252))
U32_GA(T12, T80, halfc17_out_ga(T68, s(s(T78)))) → HALF17_IN_GA(T78, X252)
LOG21_IN_GA(s(s(T12)), T90) → U34_GA(T12, T90, halfc17_in_ga(T12, s(s(T28))))
U34_GA(T12, T90, halfc17_out_ga(T12, s(s(T28)))) → U35_GA(T12, T90, halfc17_in_ga(T28, s(s(T38))))
U35_GA(T12, T90, halfc17_out_ga(T28, s(s(T38)))) → U36_GA(T12, T90, halfc17_in_ga(T38, s(s(T48))))
U36_GA(T12, T90, halfc17_out_ga(T38, s(s(T48)))) → U37_GA(T12, T90, halfc17_in_ga(T48, s(s(T58))))
U37_GA(T12, T90, halfc17_out_ga(T48, s(s(T58)))) → U38_GA(T12, T90, halfc17_in_ga(T58, s(s(T68))))
U38_GA(T12, T90, halfc17_out_ga(T58, s(s(T68)))) → U39_GA(T12, T90, halfc17_in_ga(T68, s(s(T78))))
U39_GA(T12, T90, halfc17_out_ga(T68, s(s(T78)))) → U40_GA(T12, T90, halfc17_in_ga(T78, s(s(T88))))
U40_GA(T12, T90, halfc17_out_ga(T78, s(s(T88)))) → U41_GA(T12, T90, p139_in_gaga(T88, X286, s(s(s(s(s(s(s(0))))))), T90))
U40_GA(T12, T90, halfc17_out_ga(T78, s(s(T88)))) → P139_IN_GAGA(T88, X286, s(s(s(s(s(s(s(0))))))), T90)
P139_IN_GAGA(T88, X286, T92, T90) → U3_GAGA(T88, X286, T92, T90, half17_in_ga(T88, X286))
P139_IN_GAGA(T88, X286, T92, T90) → HALF17_IN_GA(T88, X286)
P139_IN_GAGA(T88, s(s(T114)), T115, T117) → U4_GAGA(T88, T114, T115, T117, halfc17_in_ga(T88, s(s(T114))))
U4_GAGA(T88, T114, T115, T117, halfc17_out_ga(T88, s(s(T114)))) → U5_GAGA(T88, T114, T115, T117, p139_in_gaga(T114, X323, s(T115), T117))
U4_GAGA(T88, T114, T115, T117, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, X323, s(T115), T117)

The TRS R consists of the following rules:

halfc17_in_ga(T20, s(X46)) → U44_ga(T20, X46, halfc22_in_ga(T20, X46))
halfc22_in_ga(0, 0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0), 0) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23)), s(X55)) → U43_ga(T23, X55, halfc22_in_ga(T23, X55))
U43_ga(T23, X55, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))
U44_ga(T20, X46, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
half17_in_ga(x1, x2)  =  half17_in_ga(x1)
half22_in_ga(x1, x2)  =  half22_in_ga(x1)
halfc17_in_ga(x1, x2)  =  halfc17_in_ga(x1)
U44_ga(x1, x2, x3)  =  U44_ga(x1, x3)
halfc22_in_ga(x1, x2)  =  halfc22_in_ga(x1)
0  =  0
halfc22_out_ga(x1, x2)  =  halfc22_out_ga(x1, x2)
U43_ga(x1, x2, x3)  =  U43_ga(x1, x3)
halfc17_out_ga(x1, x2)  =  halfc17_out_ga(x1, x2)
p139_in_gaga(x1, x2, x3, x4)  =  p139_in_gaga(x1, x3)
LOG21_IN_GA(x1, x2)  =  LOG21_IN_GA(x1)
U6_GA(x1, x2, x3)  =  U6_GA(x1, x3)
HALF17_IN_GA(x1, x2)  =  HALF17_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
HALF22_IN_GA(x1, x2)  =  HALF22_IN_GA(x1)
U1_GA(x1, x2, x3)  =  U1_GA(x1, x3)
U7_GA(x1, x2, x3)  =  U7_GA(x1, x3)
U8_GA(x1, x2, x3)  =  U8_GA(x1, x3)
U9_GA(x1, x2, x3)  =  U9_GA(x1, x3)
U10_GA(x1, x2, x3)  =  U10_GA(x1, x3)
U11_GA(x1, x2, x3)  =  U11_GA(x1, x3)
U12_GA(x1, x2, x3)  =  U12_GA(x1, x3)
U13_GA(x1, x2, x3)  =  U13_GA(x1, x3)
U14_GA(x1, x2, x3)  =  U14_GA(x1, x3)
U15_GA(x1, x2, x3)  =  U15_GA(x1, x3)
U16_GA(x1, x2, x3)  =  U16_GA(x1, x3)
U17_GA(x1, x2, x3)  =  U17_GA(x1, x3)
U18_GA(x1, x2, x3)  =  U18_GA(x1, x3)
U19_GA(x1, x2, x3)  =  U19_GA(x1, x3)
U20_GA(x1, x2, x3)  =  U20_GA(x1, x3)
U21_GA(x1, x2, x3)  =  U21_GA(x1, x3)
U22_GA(x1, x2, x3)  =  U22_GA(x1, x3)
U23_GA(x1, x2, x3)  =  U23_GA(x1, x3)
U24_GA(x1, x2, x3)  =  U24_GA(x1, x3)
U25_GA(x1, x2, x3)  =  U25_GA(x1, x3)
U26_GA(x1, x2, x3)  =  U26_GA(x1, x3)
U27_GA(x1, x2, x3)  =  U27_GA(x1, x3)
U28_GA(x1, x2, x3)  =  U28_GA(x1, x3)
U29_GA(x1, x2, x3)  =  U29_GA(x1, x3)
U30_GA(x1, x2, x3)  =  U30_GA(x1, x3)
U31_GA(x1, x2, x3)  =  U31_GA(x1, x3)
U32_GA(x1, x2, x3)  =  U32_GA(x1, x3)
U33_GA(x1, x2, x3)  =  U33_GA(x1, x3)
U34_GA(x1, x2, x3)  =  U34_GA(x1, x3)
U35_GA(x1, x2, x3)  =  U35_GA(x1, x3)
U36_GA(x1, x2, x3)  =  U36_GA(x1, x3)
U37_GA(x1, x2, x3)  =  U37_GA(x1, x3)
U38_GA(x1, x2, x3)  =  U38_GA(x1, x3)
U39_GA(x1, x2, x3)  =  U39_GA(x1, x3)
U40_GA(x1, x2, x3)  =  U40_GA(x1, x3)
U41_GA(x1, x2, x3)  =  U41_GA(x1, x3)
P139_IN_GAGA(x1, x2, x3, x4)  =  P139_IN_GAGA(x1, x3)
U3_GAGA(x1, x2, x3, x4, x5)  =  U3_GAGA(x1, x3, x5)
U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)
U5_GAGA(x1, x2, x3, x4, x5)  =  U5_GAGA(x1, x2, x3, x5)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 50 less nodes.

(6) Complex Obligation (AND)

(7) Obligation:

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

HALF22_IN_GA(s(s(T23)), s(X55)) → HALF22_IN_GA(T23, X55)

The TRS R consists of the following rules:

halfc17_in_ga(T20, s(X46)) → U44_ga(T20, X46, halfc22_in_ga(T20, X46))
halfc22_in_ga(0, 0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0), 0) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23)), s(X55)) → U43_ga(T23, X55, halfc22_in_ga(T23, X55))
U43_ga(T23, X55, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))
U44_ga(T20, X46, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
halfc17_in_ga(x1, x2)  =  halfc17_in_ga(x1)
U44_ga(x1, x2, x3)  =  U44_ga(x1, x3)
halfc22_in_ga(x1, x2)  =  halfc22_in_ga(x1)
0  =  0
halfc22_out_ga(x1, x2)  =  halfc22_out_ga(x1, x2)
U43_ga(x1, x2, x3)  =  U43_ga(x1, x3)
halfc17_out_ga(x1, x2)  =  halfc17_out_ga(x1, x2)
HALF22_IN_GA(x1, x2)  =  HALF22_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:

HALF22_IN_GA(s(s(T23)), s(X55)) → HALF22_IN_GA(T23, X55)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
HALF22_IN_GA(x1, x2)  =  HALF22_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:

HALF22_IN_GA(s(s(T23))) → HALF22_IN_GA(T23)

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:

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

(13) YES

(14) Obligation:

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

P139_IN_GAGA(T88, s(s(T114)), T115, T117) → U4_GAGA(T88, T114, T115, T117, halfc17_in_ga(T88, s(s(T114))))
U4_GAGA(T88, T114, T115, T117, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, X323, s(T115), T117)

The TRS R consists of the following rules:

halfc17_in_ga(T20, s(X46)) → U44_ga(T20, X46, halfc22_in_ga(T20, X46))
halfc22_in_ga(0, 0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0), 0) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23)), s(X55)) → U43_ga(T23, X55, halfc22_in_ga(T23, X55))
U43_ga(T23, X55, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))
U44_ga(T20, X46, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))

The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
halfc17_in_ga(x1, x2)  =  halfc17_in_ga(x1)
U44_ga(x1, x2, x3)  =  U44_ga(x1, x3)
halfc22_in_ga(x1, x2)  =  halfc22_in_ga(x1)
0  =  0
halfc22_out_ga(x1, x2)  =  halfc22_out_ga(x1, x2)
U43_ga(x1, x2, x3)  =  U43_ga(x1, x3)
halfc17_out_ga(x1, x2)  =  halfc17_out_ga(x1, x2)
P139_IN_GAGA(x1, x2, x3, x4)  =  P139_IN_GAGA(x1, x3)
U4_GAGA(x1, x2, x3, x4, x5)  =  U4_GAGA(x1, x3, x5)

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:

P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, halfc17_in_ga(T88))
U4_GAGA(T88, T115, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, s(T115))

The TRS R consists of the following rules:

halfc17_in_ga(T20) → U44_ga(T20, halfc22_in_ga(T20))
halfc22_in_ga(0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0)) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23))) → U43_ga(T23, halfc22_in_ga(T23))
U43_ga(T23, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))
U44_ga(T20, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))

The set Q consists of the following terms:

halfc17_in_ga(x0)
halfc22_in_ga(x0)
U43_ga(x0, x1)
U44_ga(x0, x1)

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

(17) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, halfc17_in_ga(T88)) at position [2] we obtained the following new rules [LPAR04]:

P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, U44_ga(T88, halfc22_in_ga(T88)))

(18) Obligation:

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

U4_GAGA(T88, T115, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, s(T115))
P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, U44_ga(T88, halfc22_in_ga(T88)))

The TRS R consists of the following rules:

halfc17_in_ga(T20) → U44_ga(T20, halfc22_in_ga(T20))
halfc22_in_ga(0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0)) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23))) → U43_ga(T23, halfc22_in_ga(T23))
U43_ga(T23, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))
U44_ga(T20, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))

The set Q consists of the following terms:

halfc17_in_ga(x0)
halfc22_in_ga(x0)
U43_ga(x0, x1)
U44_ga(x0, x1)

We have to consider all (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:

U4_GAGA(T88, T115, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, s(T115))
P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, U44_ga(T88, halfc22_in_ga(T88)))

The TRS R consists of the following rules:

halfc22_in_ga(0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0)) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23))) → U43_ga(T23, halfc22_in_ga(T23))
U44_ga(T20, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))
U43_ga(T23, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))

The set Q consists of the following terms:

halfc17_in_ga(x0)
halfc22_in_ga(x0)
U43_ga(x0, x1)
U44_ga(x0, x1)

We have to consider all (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].

halfc17_in_ga(x0)

(22) Obligation:

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

U4_GAGA(T88, T115, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, s(T115))
P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, U44_ga(T88, halfc22_in_ga(T88)))

The TRS R consists of the following rules:

halfc22_in_ga(0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0)) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23))) → U43_ga(T23, halfc22_in_ga(T23))
U44_ga(T20, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))
U43_ga(T23, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))

The set Q consists of the following terms:

halfc22_in_ga(x0)
U43_ga(x0, x1)
U44_ga(x0, x1)

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

(23) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U4_GAGA(T88, T115, halfc17_out_ga(T88, s(s(T114)))) → P139_IN_GAGA(T114, s(T115))
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(0) = 0   
POL(P139_IN_GAGA(x1, x2)) = 1 + x1   
POL(U43_ga(x1, x2)) = 1 + x2   
POL(U44_ga(x1, x2)) = x2   
POL(U4_GAGA(x1, x2, x3)) = x3   
POL(halfc17_out_ga(x1, x2)) = x2   
POL(halfc22_in_ga(x1)) = 1 + x1   
POL(halfc22_out_ga(x1, x2)) = 1 + x2   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented:

halfc22_in_ga(0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0)) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23))) → U43_ga(T23, halfc22_in_ga(T23))
U44_ga(T20, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))
U43_ga(T23, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))

(24) Obligation:

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

P139_IN_GAGA(T88, T115) → U4_GAGA(T88, T115, U44_ga(T88, halfc22_in_ga(T88)))

The TRS R consists of the following rules:

halfc22_in_ga(0) → halfc22_out_ga(0, 0)
halfc22_in_ga(s(0)) → halfc22_out_ga(s(0), 0)
halfc22_in_ga(s(s(T23))) → U43_ga(T23, halfc22_in_ga(T23))
U44_ga(T20, halfc22_out_ga(T20, X46)) → halfc17_out_ga(T20, s(X46))
U43_ga(T23, halfc22_out_ga(T23, X55)) → halfc22_out_ga(s(s(T23)), s(X55))

The set Q consists of the following terms:

halfc22_in_ga(x0)
U43_ga(x0, x1)
U44_ga(x0, x1)

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

(25) DependencyGraphProof (EQUIVALENT transformation)

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

(26) TRUE