(0) Obligation:

Clauses:

insert(X, void, tree(X, void, void)).
insert(X, tree(X, Left, Right), tree(X, Left, Right)).
insert(X, tree(Y, Left, Right), tree(Y, Left1, Right)) :- ','(less(X, Y), insert(X, Left, Left1)).
insert(X, tree(Y, Left, Right), tree(Y, Left, Right1)) :- ','(less(Y, X), insert(X, Right, Right1)).
less(0, s(X1)).
less(s(X), s(Y)) :- less(X, Y).

Queries:

insert(g,a,g).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

less17(s(T30)) :- less17(T30).
p15(T25, T20) :- less17(T25).
p15(T25, T20) :- ','(less17(T25), insert1(s(T25), T20, void)).
p28(s(T90), T87) :- p15(T90, T87).
less146(0, s(T327)).
less146(s(T332), s(T333)) :- less146(T332, T333).
less88(0, s(T232)).
less88(s(0), s(s(T245))).
less88(s(s(0)), s(s(s(T258)))).
less88(s(s(s(0))), s(s(s(s(T271))))).
less88(s(s(s(s(0)))), s(s(s(s(s(T284)))))).
less88(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))).
less88(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))).
less88(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) :- less146(T315, T316).
insert1(T5, void, tree(T5, void, void)).
insert1(T9, tree(T9, void, void), tree(T9, void, void)).
insert1(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) :- p15(T25, T20).
insert1(T56, tree(T56, void, T60), tree(T56, void, void)) :- less17(T56).
insert1(T56, tree(T56, void, T60), tree(T56, void, void)) :- ','(less17(T56), insert1(T56, T60, void)).
insert1(T83, tree(T83, void, T87), tree(T83, void, void)) :- p28(T83, T87).
insert1(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) :- p15(T105, T100).
insert1(T115, tree(T115, void, T119), tree(T115, void, void)) :- p28(T115, T119).
insert1(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) :- p15(T132, T129).
insert1(T137, tree(T137, T138, T139), tree(T137, T138, T139)).
insert1(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) :- less17(T155).
insert1(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) :- ','(less17(T155), insert1(s(T155), T150, T149)).
insert1(T170, tree(T170, T172, T175), tree(T170, T172, T174)) :- less17(T170).
insert1(T170, tree(T170, T172, T175), tree(T170, T172, T174)) :- ','(less17(T170), insert1(T170, T175, T174)).
insert1(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) :- less17(T193).
insert1(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) :- ','(less17(T193), insert1(s(T193), T190, T189)).
insert1(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) :- insert1(0, T208, T207).
insert1(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) :- less88(T222, T223).
insert1(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) :- ','(less88(T222, T223), insert1(s(T222), T208, T207)).
insert1(T348, tree(T349, T350, T353), tree(T349, T350, T352)) :- less146(T349, T348).
insert1(T348, tree(T349, T350, T353), tree(T349, T350, T352)) :- ','(less146(T349, T348), insert1(T348, T353, T352)).
insert1(s(T375), tree(0, T367, T370), tree(0, T367, T369)) :- insert1(s(T375), T370, T369).
insert1(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) :- less146(T382, T383).
insert1(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) :- ','(less146(T382, T383), insert1(s(T383), T370, T369)).

Queries:

insert1(g,a,g).

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
insert1_in: (b,f,b)
p15_in: (b,f)
less17_in: (b)
p28_in: (b,f)
less88_in: (b,b)
less146_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)

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

INSERT1_IN_GAG(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_GAG(T25, T20, p15_in_ga(T25, T20))
INSERT1_IN_GAG(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → P15_IN_GA(T25, T20)
P15_IN_GA(T25, T20) → U2_GA(T25, T20, less17_in_g(T25))
P15_IN_GA(T25, T20) → LESS17_IN_G(T25)
LESS17_IN_G(s(T30)) → U1_G(T30, less17_in_g(T30))
LESS17_IN_G(s(T30)) → LESS17_IN_G(T30)
U2_GA(T25, T20, less17_out_g(T25)) → U3_GA(T25, T20, insert1_in_gag(s(T25), T20, void))
U2_GA(T25, T20, less17_out_g(T25)) → INSERT1_IN_GAG(s(T25), T20, void)
INSERT1_IN_GAG(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_GAG(T56, T60, less17_in_g(T56))
INSERT1_IN_GAG(T56, tree(T56, void, T60), tree(T56, void, void)) → LESS17_IN_G(T56)
U8_GAG(T56, T60, less17_out_g(T56)) → U9_GAG(T56, T60, insert1_in_gag(T56, T60, void))
U8_GAG(T56, T60, less17_out_g(T56)) → INSERT1_IN_GAG(T56, T60, void)
INSERT1_IN_GAG(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_GAG(T83, T87, p28_in_ga(T83, T87))
INSERT1_IN_GAG(T83, tree(T83, void, T87), tree(T83, void, void)) → P28_IN_GA(T83, T87)
P28_IN_GA(s(T90), T87) → U4_GA(T90, T87, p15_in_ga(T90, T87))
P28_IN_GA(s(T90), T87) → P15_IN_GA(T90, T87)
INSERT1_IN_GAG(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_GAG(T105, T100, p15_in_ga(T105, T100))
INSERT1_IN_GAG(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_GAG(T115, T119, p28_in_ga(T115, T119))
INSERT1_IN_GAG(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_GAG(T132, T129, p15_in_ga(T132, T129))
INSERT1_IN_GAG(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → P15_IN_GA(T132, T129)
INSERT1_IN_GAG(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_GAG(T155, T150, T148, T149, less17_in_g(T155))
INSERT1_IN_GAG(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → LESS17_IN_G(T155)
U14_GAG(T155, T150, T148, T149, less17_out_g(T155)) → U15_GAG(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
U14_GAG(T155, T150, T148, T149, less17_out_g(T155)) → INSERT1_IN_GAG(s(T155), T150, T149)
INSERT1_IN_GAG(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_GAG(T170, T172, T175, T174, less17_in_g(T170))
INSERT1_IN_GAG(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → LESS17_IN_G(T170)
U16_GAG(T170, T172, T175, T174, less17_out_g(T170)) → U17_GAG(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
U16_GAG(T170, T172, T175, T174, less17_out_g(T170)) → INSERT1_IN_GAG(T170, T175, T174)
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_GAG(T193, T187, T190, T189, less17_in_g(T193))
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → LESS17_IN_G(T193)
U18_GAG(T193, T187, T190, T189, less17_out_g(T193)) → U19_GAG(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
U18_GAG(T193, T187, T190, T189, less17_out_g(T193)) → INSERT1_IN_GAG(s(T193), T190, T189)
INSERT1_IN_GAG(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_GAG(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
INSERT1_IN_GAG(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → INSERT1_IN_GAG(0, T208, T207)
INSERT1_IN_GAG(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_GAG(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
INSERT1_IN_GAG(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → LESS88_IN_GG(T222, T223)
LESS88_IN_GG(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_GG(T315, T316, less146_in_gg(T315, T316))
LESS88_IN_GG(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → LESS146_IN_GG(T315, T316)
LESS146_IN_GG(s(T332), s(T333)) → U5_GG(T332, T333, less146_in_gg(T332, T333))
LESS146_IN_GG(s(T332), s(T333)) → LESS146_IN_GG(T332, T333)
U21_GAG(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_GAG(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
U21_GAG(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → INSERT1_IN_GAG(s(T222), T208, T207)
INSERT1_IN_GAG(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_GAG(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
INSERT1_IN_GAG(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → LESS146_IN_GG(T349, T348)
U23_GAG(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_GAG(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
U23_GAG(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → INSERT1_IN_GAG(T348, T353, T352)
INSERT1_IN_GAG(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_GAG(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
INSERT1_IN_GAG(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → INSERT1_IN_GAG(s(T375), T370, T369)
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_GAG(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → LESS146_IN_GG(T382, T383)
U26_GAG(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_GAG(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U26_GAG(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → INSERT1_IN_GAG(s(T383), T370, T369)

The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U7_GAG(x1, x2, x3)  =  U7_GAG(x3)
P15_IN_GA(x1, x2)  =  P15_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
LESS17_IN_G(x1)  =  LESS17_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
U3_GA(x1, x2, x3)  =  U3_GA(x3)
U8_GAG(x1, x2, x3)  =  U8_GAG(x1, x3)
U9_GAG(x1, x2, x3)  =  U9_GAG(x3)
U10_GAG(x1, x2, x3)  =  U10_GAG(x3)
P28_IN_GA(x1, x2)  =  P28_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x3)
U11_GAG(x1, x2, x3)  =  U11_GAG(x3)
U12_GAG(x1, x2, x3)  =  U12_GAG(x3)
U13_GAG(x1, x2, x3)  =  U13_GAG(x3)
U14_GAG(x1, x2, x3, x4, x5)  =  U14_GAG(x1, x4, x5)
U15_GAG(x1, x2, x3, x4, x5)  =  U15_GAG(x5)
U16_GAG(x1, x2, x3, x4, x5)  =  U16_GAG(x1, x4, x5)
U17_GAG(x1, x2, x3, x4, x5)  =  U17_GAG(x5)
U18_GAG(x1, x2, x3, x4, x5)  =  U18_GAG(x1, x4, x5)
U19_GAG(x1, x2, x3, x4, x5)  =  U19_GAG(x5)
U20_GAG(x1, x2, x3, x4, x5)  =  U20_GAG(x5)
U21_GAG(x1, x2, x3, x4, x5, x6)  =  U21_GAG(x1, x5, x6)
LESS88_IN_GG(x1, x2)  =  LESS88_IN_GG(x1, x2)
U6_GG(x1, x2, x3)  =  U6_GG(x3)
LESS146_IN_GG(x1, x2)  =  LESS146_IN_GG(x1, x2)
U5_GG(x1, x2, x3)  =  U5_GG(x3)
U22_GAG(x1, x2, x3, x4, x5, x6)  =  U22_GAG(x6)
U23_GAG(x1, x2, x3, x4, x5, x6)  =  U23_GAG(x1, x5, x6)
U24_GAG(x1, x2, x3, x4, x5, x6)  =  U24_GAG(x6)
U25_GAG(x1, x2, x3, x4, x5)  =  U25_GAG(x5)
U26_GAG(x1, x2, x3, x4, x5, x6)  =  U26_GAG(x1, x5, x6)
U27_GAG(x1, x2, x3, x4, x5, x6)  =  U27_GAG(x6)

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

(6) Obligation:

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

INSERT1_IN_GAG(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_GAG(T25, T20, p15_in_ga(T25, T20))
INSERT1_IN_GAG(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → P15_IN_GA(T25, T20)
P15_IN_GA(T25, T20) → U2_GA(T25, T20, less17_in_g(T25))
P15_IN_GA(T25, T20) → LESS17_IN_G(T25)
LESS17_IN_G(s(T30)) → U1_G(T30, less17_in_g(T30))
LESS17_IN_G(s(T30)) → LESS17_IN_G(T30)
U2_GA(T25, T20, less17_out_g(T25)) → U3_GA(T25, T20, insert1_in_gag(s(T25), T20, void))
U2_GA(T25, T20, less17_out_g(T25)) → INSERT1_IN_GAG(s(T25), T20, void)
INSERT1_IN_GAG(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_GAG(T56, T60, less17_in_g(T56))
INSERT1_IN_GAG(T56, tree(T56, void, T60), tree(T56, void, void)) → LESS17_IN_G(T56)
U8_GAG(T56, T60, less17_out_g(T56)) → U9_GAG(T56, T60, insert1_in_gag(T56, T60, void))
U8_GAG(T56, T60, less17_out_g(T56)) → INSERT1_IN_GAG(T56, T60, void)
INSERT1_IN_GAG(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_GAG(T83, T87, p28_in_ga(T83, T87))
INSERT1_IN_GAG(T83, tree(T83, void, T87), tree(T83, void, void)) → P28_IN_GA(T83, T87)
P28_IN_GA(s(T90), T87) → U4_GA(T90, T87, p15_in_ga(T90, T87))
P28_IN_GA(s(T90), T87) → P15_IN_GA(T90, T87)
INSERT1_IN_GAG(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_GAG(T105, T100, p15_in_ga(T105, T100))
INSERT1_IN_GAG(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_GAG(T115, T119, p28_in_ga(T115, T119))
INSERT1_IN_GAG(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_GAG(T132, T129, p15_in_ga(T132, T129))
INSERT1_IN_GAG(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → P15_IN_GA(T132, T129)
INSERT1_IN_GAG(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_GAG(T155, T150, T148, T149, less17_in_g(T155))
INSERT1_IN_GAG(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → LESS17_IN_G(T155)
U14_GAG(T155, T150, T148, T149, less17_out_g(T155)) → U15_GAG(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
U14_GAG(T155, T150, T148, T149, less17_out_g(T155)) → INSERT1_IN_GAG(s(T155), T150, T149)
INSERT1_IN_GAG(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_GAG(T170, T172, T175, T174, less17_in_g(T170))
INSERT1_IN_GAG(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → LESS17_IN_G(T170)
U16_GAG(T170, T172, T175, T174, less17_out_g(T170)) → U17_GAG(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
U16_GAG(T170, T172, T175, T174, less17_out_g(T170)) → INSERT1_IN_GAG(T170, T175, T174)
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_GAG(T193, T187, T190, T189, less17_in_g(T193))
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → LESS17_IN_G(T193)
U18_GAG(T193, T187, T190, T189, less17_out_g(T193)) → U19_GAG(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
U18_GAG(T193, T187, T190, T189, less17_out_g(T193)) → INSERT1_IN_GAG(s(T193), T190, T189)
INSERT1_IN_GAG(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_GAG(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
INSERT1_IN_GAG(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → INSERT1_IN_GAG(0, T208, T207)
INSERT1_IN_GAG(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_GAG(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
INSERT1_IN_GAG(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → LESS88_IN_GG(T222, T223)
LESS88_IN_GG(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_GG(T315, T316, less146_in_gg(T315, T316))
LESS88_IN_GG(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → LESS146_IN_GG(T315, T316)
LESS146_IN_GG(s(T332), s(T333)) → U5_GG(T332, T333, less146_in_gg(T332, T333))
LESS146_IN_GG(s(T332), s(T333)) → LESS146_IN_GG(T332, T333)
U21_GAG(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_GAG(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
U21_GAG(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → INSERT1_IN_GAG(s(T222), T208, T207)
INSERT1_IN_GAG(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_GAG(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
INSERT1_IN_GAG(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → LESS146_IN_GG(T349, T348)
U23_GAG(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_GAG(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
U23_GAG(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → INSERT1_IN_GAG(T348, T353, T352)
INSERT1_IN_GAG(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_GAG(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
INSERT1_IN_GAG(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → INSERT1_IN_GAG(s(T375), T370, T369)
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_GAG(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → LESS146_IN_GG(T382, T383)
U26_GAG(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_GAG(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U26_GAG(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → INSERT1_IN_GAG(s(T383), T370, T369)

The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U7_GAG(x1, x2, x3)  =  U7_GAG(x3)
P15_IN_GA(x1, x2)  =  P15_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x1, x3)
LESS17_IN_G(x1)  =  LESS17_IN_G(x1)
U1_G(x1, x2)  =  U1_G(x2)
U3_GA(x1, x2, x3)  =  U3_GA(x3)
U8_GAG(x1, x2, x3)  =  U8_GAG(x1, x3)
U9_GAG(x1, x2, x3)  =  U9_GAG(x3)
U10_GAG(x1, x2, x3)  =  U10_GAG(x3)
P28_IN_GA(x1, x2)  =  P28_IN_GA(x1)
U4_GA(x1, x2, x3)  =  U4_GA(x3)
U11_GAG(x1, x2, x3)  =  U11_GAG(x3)
U12_GAG(x1, x2, x3)  =  U12_GAG(x3)
U13_GAG(x1, x2, x3)  =  U13_GAG(x3)
U14_GAG(x1, x2, x3, x4, x5)  =  U14_GAG(x1, x4, x5)
U15_GAG(x1, x2, x3, x4, x5)  =  U15_GAG(x5)
U16_GAG(x1, x2, x3, x4, x5)  =  U16_GAG(x1, x4, x5)
U17_GAG(x1, x2, x3, x4, x5)  =  U17_GAG(x5)
U18_GAG(x1, x2, x3, x4, x5)  =  U18_GAG(x1, x4, x5)
U19_GAG(x1, x2, x3, x4, x5)  =  U19_GAG(x5)
U20_GAG(x1, x2, x3, x4, x5)  =  U20_GAG(x5)
U21_GAG(x1, x2, x3, x4, x5, x6)  =  U21_GAG(x1, x5, x6)
LESS88_IN_GG(x1, x2)  =  LESS88_IN_GG(x1, x2)
U6_GG(x1, x2, x3)  =  U6_GG(x3)
LESS146_IN_GG(x1, x2)  =  LESS146_IN_GG(x1, x2)
U5_GG(x1, x2, x3)  =  U5_GG(x3)
U22_GAG(x1, x2, x3, x4, x5, x6)  =  U22_GAG(x6)
U23_GAG(x1, x2, x3, x4, x5, x6)  =  U23_GAG(x1, x5, x6)
U24_GAG(x1, x2, x3, x4, x5, x6)  =  U24_GAG(x6)
U25_GAG(x1, x2, x3, x4, x5)  =  U25_GAG(x5)
U26_GAG(x1, x2, x3, x4, x5, x6)  =  U26_GAG(x1, x5, x6)
U27_GAG(x1, x2, x3, x4, x5, x6)  =  U27_GAG(x6)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 36 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

LESS146_IN_GG(s(T332), s(T333)) → LESS146_IN_GG(T332, T333)

The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)
LESS146_IN_GG(x1, x2)  =  LESS146_IN_GG(x1, x2)

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

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

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

LESS146_IN_GG(s(T332), s(T333)) → LESS146_IN_GG(T332, T333)

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

(12) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

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

LESS146_IN_GG(s(T332), s(T333)) → LESS146_IN_GG(T332, T333)

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

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

  • LESS146_IN_GG(s(T332), s(T333)) → LESS146_IN_GG(T332, T333)
    The graph contains the following edges 1 > 1, 2 > 2

(15) YES

(16) Obligation:

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

LESS17_IN_G(s(T30)) → LESS17_IN_G(T30)

The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)
LESS17_IN_G(x1)  =  LESS17_IN_G(x1)

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

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

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

LESS17_IN_G(s(T30)) → LESS17_IN_G(T30)

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

(19) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

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

LESS17_IN_G(s(T30)) → LESS17_IN_G(T30)

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

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

  • LESS17_IN_G(s(T30)) → LESS17_IN_G(T30)
    The graph contains the following edges 1 > 1

(22) YES

(23) Obligation:

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

INSERT1_IN_GAG(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_GAG(T155, T150, T148, T149, less17_in_g(T155))
U14_GAG(T155, T150, T148, T149, less17_out_g(T155)) → INSERT1_IN_GAG(s(T155), T150, T149)
INSERT1_IN_GAG(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_GAG(T170, T172, T175, T174, less17_in_g(T170))
U16_GAG(T170, T172, T175, T174, less17_out_g(T170)) → INSERT1_IN_GAG(T170, T175, T174)
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_GAG(T193, T187, T190, T189, less17_in_g(T193))
U18_GAG(T193, T187, T190, T189, less17_out_g(T193)) → INSERT1_IN_GAG(s(T193), T190, T189)
INSERT1_IN_GAG(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_GAG(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
U21_GAG(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → INSERT1_IN_GAG(s(T222), T208, T207)
INSERT1_IN_GAG(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_GAG(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_GAG(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → INSERT1_IN_GAG(T348, T353, T352)
INSERT1_IN_GAG(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → INSERT1_IN_GAG(0, T208, T207)
INSERT1_IN_GAG(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → INSERT1_IN_GAG(s(T375), T370, T369)
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_GAG(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_GAG(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → INSERT1_IN_GAG(s(T383), T370, T369)

The TRS R consists of the following rules:

insert1_in_gag(T5, void, tree(T5, void, void)) → insert1_out_gag(T5, void, tree(T5, void, void))
insert1_in_gag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_gag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void)) → U7_gag(T25, T20, p15_in_ga(T25, T20))
p15_in_ga(T25, T20) → U2_ga(T25, T20, less17_in_g(T25))
less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U2_ga(T25, T20, less17_out_g(T25)) → p15_out_ga(T25, T20)
U2_ga(T25, T20, less17_out_g(T25)) → U3_ga(T25, T20, insert1_in_gag(s(T25), T20, void))
insert1_in_gag(T56, tree(T56, void, T60), tree(T56, void, void)) → U8_gag(T56, T60, less17_in_g(T56))
U8_gag(T56, T60, less17_out_g(T56)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U8_gag(T56, T60, less17_out_g(T56)) → U9_gag(T56, T60, insert1_in_gag(T56, T60, void))
insert1_in_gag(T83, tree(T83, void, T87), tree(T83, void, void)) → U10_gag(T83, T87, p28_in_ga(T83, T87))
p28_in_ga(s(T90), T87) → U4_ga(T90, T87, p15_in_ga(T90, T87))
U4_ga(T90, T87, p15_out_ga(T90, T87)) → p28_out_ga(s(T90), T87)
U10_gag(T83, T87, p28_out_ga(T83, T87)) → insert1_out_gag(T83, tree(T83, void, T87), tree(T83, void, void))
insert1_in_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void)) → U11_gag(T105, T100, p15_in_ga(T105, T100))
U11_gag(T105, T100, p15_out_ga(T105, T100)) → insert1_out_gag(s(T105), tree(s(T105), T100, void), tree(s(T105), void, void))
insert1_in_gag(T115, tree(T115, void, T119), tree(T115, void, void)) → U12_gag(T115, T119, p28_in_ga(T115, T119))
U12_gag(T115, T119, p28_out_ga(T115, T119)) → insert1_out_gag(T115, tree(T115, void, T119), tree(T115, void, void))
insert1_in_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void)) → U13_gag(T132, T129, p15_in_ga(T132, T129))
U13_gag(T132, T129, p15_out_ga(T132, T129)) → insert1_out_gag(s(T132), tree(s(T132), void, T129), tree(s(T132), void, void))
insert1_in_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139)) → insert1_out_gag(T137, tree(T137, T138, T139), tree(T137, T138, T139))
insert1_in_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_gag(T155, T150, T148, T149, less17_in_g(T155))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U14_gag(T155, T150, T148, T149, less17_out_g(T155)) → U15_gag(T155, T150, T148, T149, insert1_in_gag(s(T155), T150, T149))
insert1_in_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_gag(T170, T172, T175, T174, less17_in_g(T170))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U16_gag(T170, T172, T175, T174, less17_out_g(T170)) → U17_gag(T170, T172, T175, T174, insert1_in_gag(T170, T175, T174))
insert1_in_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_gag(T193, T187, T190, T189, less17_in_g(T193))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U18_gag(T193, T187, T190, T189, less17_out_g(T193)) → U19_gag(T193, T187, T190, T189, insert1_in_gag(s(T193), T190, T189))
insert1_in_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → U20_gag(T213, T208, T206, T207, insert1_in_gag(0, T208, T207))
insert1_in_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_gag(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U21_gag(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → U22_gag(T222, T223, T208, T206, T207, insert1_in_gag(s(T222), T208, T207))
insert1_in_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_gag(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U23_gag(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → U24_gag(T348, T349, T350, T353, T352, insert1_in_gag(T348, T353, T352))
insert1_in_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → U25_gag(T375, T367, T370, T369, insert1_in_gag(s(T375), T370, T369))
insert1_in_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_gag(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U26_gag(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → U27_gag(T383, T382, T367, T370, T369, insert1_in_gag(s(T383), T370, T369))
U27_gag(T383, T382, T367, T370, T369, insert1_out_gag(s(T383), T370, T369)) → insert1_out_gag(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369))
U25_gag(T375, T367, T370, T369, insert1_out_gag(s(T375), T370, T369)) → insert1_out_gag(s(T375), tree(0, T367, T370), tree(0, T367, T369))
U24_gag(T348, T349, T350, T353, T352, insert1_out_gag(T348, T353, T352)) → insert1_out_gag(T348, tree(T349, T350, T353), tree(T349, T350, T352))
U22_gag(T222, T223, T208, T206, T207, insert1_out_gag(s(T222), T208, T207)) → insert1_out_gag(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206))
U20_gag(T213, T208, T206, T207, insert1_out_gag(0, T208, T207)) → insert1_out_gag(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206))
U19_gag(T193, T187, T190, T189, insert1_out_gag(s(T193), T190, T189)) → insert1_out_gag(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189))
U17_gag(T170, T172, T175, T174, insert1_out_gag(T170, T175, T174)) → insert1_out_gag(T170, tree(T170, T172, T175), tree(T170, T172, T174))
U15_gag(T155, T150, T148, T149, insert1_out_gag(s(T155), T150, T149)) → insert1_out_gag(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148))
U9_gag(T56, T60, insert1_out_gag(T56, T60, void)) → insert1_out_gag(T56, tree(T56, void, T60), tree(T56, void, void))
U3_ga(T25, T20, insert1_out_gag(s(T25), T20, void)) → p15_out_ga(T25, T20)
U7_gag(T25, T20, p15_out_ga(T25, T20)) → insert1_out_gag(s(T25), tree(s(T25), T20, void), tree(s(T25), void, void))

The argument filtering Pi contains the following mapping:
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
s(x1)  =  s(x1)
U7_gag(x1, x2, x3)  =  U7_gag(x3)
p15_in_ga(x1, x2)  =  p15_in_ga(x1)
U2_ga(x1, x2, x3)  =  U2_ga(x1, x3)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
p15_out_ga(x1, x2)  =  p15_out_ga
U3_ga(x1, x2, x3)  =  U3_ga(x3)
U8_gag(x1, x2, x3)  =  U8_gag(x1, x3)
U9_gag(x1, x2, x3)  =  U9_gag(x3)
U10_gag(x1, x2, x3)  =  U10_gag(x3)
p28_in_ga(x1, x2)  =  p28_in_ga(x1)
U4_ga(x1, x2, x3)  =  U4_ga(x3)
p28_out_ga(x1, x2)  =  p28_out_ga
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3)  =  U12_gag(x3)
U13_gag(x1, x2, x3)  =  U13_gag(x3)
U14_gag(x1, x2, x3, x4, x5)  =  U14_gag(x1, x4, x5)
U15_gag(x1, x2, x3, x4, x5)  =  U15_gag(x5)
U16_gag(x1, x2, x3, x4, x5)  =  U16_gag(x1, x4, x5)
U17_gag(x1, x2, x3, x4, x5)  =  U17_gag(x5)
U18_gag(x1, x2, x3, x4, x5)  =  U18_gag(x1, x4, x5)
U19_gag(x1, x2, x3, x4, x5)  =  U19_gag(x5)
0  =  0
U20_gag(x1, x2, x3, x4, x5)  =  U20_gag(x5)
U21_gag(x1, x2, x3, x4, x5, x6)  =  U21_gag(x1, x5, x6)
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
U22_gag(x1, x2, x3, x4, x5, x6)  =  U22_gag(x6)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x1, x5, x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x6)
U25_gag(x1, x2, x3, x4, x5)  =  U25_gag(x5)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x1, x5, x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x6)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U14_GAG(x1, x2, x3, x4, x5)  =  U14_GAG(x1, x4, x5)
U16_GAG(x1, x2, x3, x4, x5)  =  U16_GAG(x1, x4, x5)
U18_GAG(x1, x2, x3, x4, x5)  =  U18_GAG(x1, x4, x5)
U21_GAG(x1, x2, x3, x4, x5, x6)  =  U21_GAG(x1, x5, x6)
U23_GAG(x1, x2, x3, x4, x5, x6)  =  U23_GAG(x1, x5, x6)
U26_GAG(x1, x2, x3, x4, x5, x6)  =  U26_GAG(x1, x5, x6)

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:

INSERT1_IN_GAG(s(T155), tree(s(T155), T150, T148), tree(s(T155), T149, T148)) → U14_GAG(T155, T150, T148, T149, less17_in_g(T155))
U14_GAG(T155, T150, T148, T149, less17_out_g(T155)) → INSERT1_IN_GAG(s(T155), T150, T149)
INSERT1_IN_GAG(T170, tree(T170, T172, T175), tree(T170, T172, T174)) → U16_GAG(T170, T172, T175, T174, less17_in_g(T170))
U16_GAG(T170, T172, T175, T174, less17_out_g(T170)) → INSERT1_IN_GAG(T170, T175, T174)
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T190), tree(s(T193), T187, T189)) → U18_GAG(T193, T187, T190, T189, less17_in_g(T193))
U18_GAG(T193, T187, T190, T189, less17_out_g(T193)) → INSERT1_IN_GAG(s(T193), T190, T189)
INSERT1_IN_GAG(s(T222), tree(s(T223), T208, T206), tree(s(T223), T207, T206)) → U21_GAG(T222, T223, T208, T206, T207, less88_in_gg(T222, T223))
U21_GAG(T222, T223, T208, T206, T207, less88_out_gg(T222, T223)) → INSERT1_IN_GAG(s(T222), T208, T207)
INSERT1_IN_GAG(T348, tree(T349, T350, T353), tree(T349, T350, T352)) → U23_GAG(T348, T349, T350, T353, T352, less146_in_gg(T349, T348))
U23_GAG(T348, T349, T350, T353, T352, less146_out_gg(T349, T348)) → INSERT1_IN_GAG(T348, T353, T352)
INSERT1_IN_GAG(0, tree(s(T213), T208, T206), tree(s(T213), T207, T206)) → INSERT1_IN_GAG(0, T208, T207)
INSERT1_IN_GAG(s(T375), tree(0, T367, T370), tree(0, T367, T369)) → INSERT1_IN_GAG(s(T375), T370, T369)
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T370), tree(s(T382), T367, T369)) → U26_GAG(T383, T382, T367, T370, T369, less146_in_gg(T382, T383))
U26_GAG(T383, T382, T367, T370, T369, less146_out_gg(T382, T383)) → INSERT1_IN_GAG(s(T383), T370, T369)

The TRS R consists of the following rules:

less17_in_g(s(T30)) → U1_g(T30, less17_in_g(T30))
less88_in_gg(0, s(T232)) → less88_out_gg(0, s(T232))
less88_in_gg(s(0), s(s(T245))) → less88_out_gg(s(0), s(s(T245)))
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg(s(s(0)), s(s(s(T258))))
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg(s(s(s(0))), s(s(s(s(T271)))))
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg(s(s(s(s(0)))), s(s(s(s(s(T284))))))
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297)))))))
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310))))))))
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(T315, T316, less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg(0, s(T327))
less146_in_gg(s(T332), s(T333)) → U5_gg(T332, T333, less146_in_gg(T332, T333))
U1_g(T30, less17_out_g(T30)) → less17_out_g(s(T30))
U6_gg(T315, T316, less146_out_gg(T315, T316)) → less88_out_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316))))))))
U5_gg(T332, T333, less146_out_gg(T332, T333)) → less146_out_gg(s(T332), s(T333))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
less17_in_g(x1)  =  less17_in_g(x1)
U1_g(x1, x2)  =  U1_g(x2)
less17_out_g(x1)  =  less17_out_g
0  =  0
less88_in_gg(x1, x2)  =  less88_in_gg(x1, x2)
less88_out_gg(x1, x2)  =  less88_out_gg
U6_gg(x1, x2, x3)  =  U6_gg(x3)
less146_in_gg(x1, x2)  =  less146_in_gg(x1, x2)
less146_out_gg(x1, x2)  =  less146_out_gg
U5_gg(x1, x2, x3)  =  U5_gg(x3)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U14_GAG(x1, x2, x3, x4, x5)  =  U14_GAG(x1, x4, x5)
U16_GAG(x1, x2, x3, x4, x5)  =  U16_GAG(x1, x4, x5)
U18_GAG(x1, x2, x3, x4, x5)  =  U18_GAG(x1, x4, x5)
U21_GAG(x1, x2, x3, x4, x5, x6)  =  U21_GAG(x1, x5, x6)
U23_GAG(x1, x2, x3, x4, x5, x6)  =  U23_GAG(x1, x5, x6)
U26_GAG(x1, x2, x3, x4, x5, x6)  =  U26_GAG(x1, x5, x6)

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:

INSERT1_IN_GAG(s(T155), tree(s(T155), T149, T148)) → U14_GAG(T155, T149, less17_in_g(T155))
U14_GAG(T155, T149, less17_out_g) → INSERT1_IN_GAG(s(T155), T149)
INSERT1_IN_GAG(T170, tree(T170, T172, T174)) → U16_GAG(T170, T174, less17_in_g(T170))
U16_GAG(T170, T174, less17_out_g) → INSERT1_IN_GAG(T170, T174)
INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T189)) → U18_GAG(T193, T189, less17_in_g(T193))
U18_GAG(T193, T189, less17_out_g) → INSERT1_IN_GAG(s(T193), T189)
INSERT1_IN_GAG(s(T222), tree(s(T223), T207, T206)) → U21_GAG(T222, T207, less88_in_gg(T222, T223))
U21_GAG(T222, T207, less88_out_gg) → INSERT1_IN_GAG(s(T222), T207)
INSERT1_IN_GAG(T348, tree(T349, T350, T352)) → U23_GAG(T348, T352, less146_in_gg(T349, T348))
U23_GAG(T348, T352, less146_out_gg) → INSERT1_IN_GAG(T348, T352)
INSERT1_IN_GAG(0, tree(s(T213), T207, T206)) → INSERT1_IN_GAG(0, T207)
INSERT1_IN_GAG(s(T375), tree(0, T367, T369)) → INSERT1_IN_GAG(s(T375), T369)
INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T369)) → U26_GAG(T383, T369, less146_in_gg(T382, T383))
U26_GAG(T383, T369, less146_out_gg) → INSERT1_IN_GAG(s(T383), T369)

The TRS R consists of the following rules:

less17_in_g(s(T30)) → U1_g(less17_in_g(T30))
less88_in_gg(0, s(T232)) → less88_out_gg
less88_in_gg(s(0), s(s(T245))) → less88_out_gg
less88_in_gg(s(s(0)), s(s(s(T258)))) → less88_out_gg
less88_in_gg(s(s(s(0))), s(s(s(s(T271))))) → less88_out_gg
less88_in_gg(s(s(s(s(0)))), s(s(s(s(s(T284)))))) → less88_out_gg
less88_in_gg(s(s(s(s(s(0))))), s(s(s(s(s(s(T297))))))) → less88_out_gg
less88_in_gg(s(s(s(s(s(s(0)))))), s(s(s(s(s(s(s(T310)))))))) → less88_out_gg
less88_in_gg(s(s(s(s(s(s(s(T315))))))), s(s(s(s(s(s(s(T316)))))))) → U6_gg(less146_in_gg(T315, T316))
less146_in_gg(0, s(T327)) → less146_out_gg
less146_in_gg(s(T332), s(T333)) → U5_gg(less146_in_gg(T332, T333))
U1_g(less17_out_g) → less17_out_g
U6_gg(less146_out_gg) → less88_out_gg
U5_gg(less146_out_gg) → less146_out_gg

The set Q consists of the following terms:

less17_in_g(x0)
less88_in_gg(x0, x1)
less146_in_gg(x0, x1)
U1_g(x0)
U6_gg(x0)
U5_gg(x0)

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

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

  • U14_GAG(T155, T149, less17_out_g) → INSERT1_IN_GAG(s(T155), T149)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(s(T375), tree(0, T367, T369)) → INSERT1_IN_GAG(s(T375), T369)
    The graph contains the following edges 1 >= 1, 2 > 2

  • INSERT1_IN_GAG(s(T155), tree(s(T155), T149, T148)) → U14_GAG(T155, T149, less17_in_g(T155))
    The graph contains the following edges 1 > 1, 2 > 1, 2 > 2

  • INSERT1_IN_GAG(0, tree(s(T213), T207, T206)) → INSERT1_IN_GAG(0, T207)
    The graph contains the following edges 1 >= 1, 2 > 2

  • U16_GAG(T170, T174, less17_out_g) → INSERT1_IN_GAG(T170, T174)
    The graph contains the following edges 1 >= 1, 2 >= 2

  • INSERT1_IN_GAG(T170, tree(T170, T172, T174)) → U16_GAG(T170, T174, less17_in_g(T170))
    The graph contains the following edges 1 >= 1, 2 > 1, 2 > 2

  • U18_GAG(T193, T189, less17_out_g) → INSERT1_IN_GAG(s(T193), T189)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(s(T193), tree(s(T193), T187, T189)) → U18_GAG(T193, T189, less17_in_g(T193))
    The graph contains the following edges 1 > 1, 2 > 1, 2 > 2

  • U21_GAG(T222, T207, less88_out_gg) → INSERT1_IN_GAG(s(T222), T207)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(s(T222), tree(s(T223), T207, T206)) → U21_GAG(T222, T207, less88_in_gg(T222, T223))
    The graph contains the following edges 1 > 1, 2 > 2

  • U23_GAG(T348, T352, less146_out_gg) → INSERT1_IN_GAG(T348, T352)
    The graph contains the following edges 1 >= 1, 2 >= 2

  • U26_GAG(T383, T369, less146_out_gg) → INSERT1_IN_GAG(s(T383), T369)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(T348, tree(T349, T350, T352)) → U23_GAG(T348, T352, less146_in_gg(T349, T348))
    The graph contains the following edges 1 >= 1, 2 > 2

  • INSERT1_IN_GAG(s(T383), tree(s(T382), T367, T369)) → U26_GAG(T383, T369, less146_in_gg(T382, T383))
    The graph contains the following edges 1 > 1, 2 > 2

(29) YES