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

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

less20(0, s(T60)).
less20(s(T67), s(T66)) :- less20(T67, T66).
less33(0, s(T110)).
less33(s(T115), s(T117)) :- less33(T115, T117).
p18(T48, T47, T49) :- less20(T48, T47).
p18(T52, T47, T53) :- ','(less20(T52, T47), insert1(s(T52), T53, void)).
p43(0, s(T152), T151) :- insert1(s(T152), T151, void).
p43(s(T173), s(T175), T176) :- p50(T173, T175, T176).
p50(T173, T175, T176) :- less33(T173, T175).
p50(T173, T179, T180) :- ','(less33(T173, T179), insert1(s(T179), T180, void)).
insert1(T5, void, tree(T5, void, void)).
insert1(T9, tree(T9, void, void), tree(T9, void, void)).
insert1(0, tree(s(T26), T27, void), tree(s(T26), void, void)) :- insert1(0, T27, void).
insert1(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) :- p18(T48, T47, T49).
insert1(T98, tree(T95, void, T99), tree(T95, void, void)) :- less33(T95, T98).
insert1(T102, tree(T95, void, T103), tree(T95, void, void)) :- ','(less33(T95, T102), insert1(T102, T103, void)).
insert1(T144, tree(T141, void, T145), tree(T141, void, void)) :- p43(T141, T144, T145).
insert1(0, tree(s(T213), T214, void), tree(s(T213), void, void)) :- insert1(0, T214, void).
insert1(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) :- p18(T235, T234, T236).
insert1(T251, tree(T248, void, T252), tree(T248, void, void)) :- p43(T248, T251, T252).
insert1(s(T271), tree(0, void, T270), tree(0, void, void)) :- insert1(s(T271), T270, void).
insert1(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) :- p50(T292, T294, T295).
insert1(T301, tree(T301, T302, T303), tree(T301, T302, T303)).
insert1(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) :- insert1(0, T321, T313).
insert1(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) :- less20(T332, T331).
insert1(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) :- ','(less20(T336, T331), insert1(s(T336), T337, T313)).
insert1(T361, tree(T357, T358, T362), tree(T357, T358, T360)) :- less33(T357, T361).
insert1(T365, tree(T357, T369, T366), tree(T357, T369, T360)) :- ','(less33(T357, T365), insert1(T365, T366, T360)).
insert1(s(T393), tree(0, T382, T392), tree(0, T382, T384)) :- insert1(s(T393), T392, T384).
insert1(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) :- less33(T400, T402).
insert1(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) :- ','(less33(T400, T406), insert1(s(T406), T407, T384)).
insert1(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) :- insert1(0, T433, T425).
insert1(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) :- less20(T444, T443).
insert1(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) :- ','(less20(T448, T443), insert1(s(T448), T449, T425)).
insert1(T473, tree(T469, T470, T474), tree(T469, T470, T472)) :- less33(T469, T473).
insert1(T477, tree(T469, T481, T478), tree(T469, T481, T472)) :- ','(less33(T469, T477), insert1(T477, T478, T472)).
insert1(s(T508), tree(0, T497, T507), tree(0, T497, T499)) :- insert1(s(T508), T507, T499).
insert1(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) :- less33(T515, T517).
insert1(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) :- ','(less33(T515, T521), insert1(s(T521), T522, T499)).

Queries:

insert1(a,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: (f,f,b) (b,f,b)
p18_in: (b,b,f) (f,b,f)
less20_in: (b,b) (f,b)
less33_in: (b,b) (b,f)
p43_in: (b,b,f) (b,f,f)
p50_in: (b,b,f) (b,f,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa

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_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa

(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_AAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_AAG(T26, T27, insert1_in_gag(0, T27, void))
INSERT1_IN_AAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → INSERT1_IN_GAG(0, T27, void)
INSERT1_IN_GAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_GAG(T26, T27, insert1_in_gag(0, T27, void))
INSERT1_IN_GAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → INSERT1_IN_GAG(0, T27, void)
INSERT1_IN_GAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_GAG(T48, T47, T49, p18_in_gga(T48, T47, T49))
INSERT1_IN_GAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → P18_IN_GGA(T48, T47, T49)
P18_IN_GGA(T48, T47, T49) → U3_GGA(T48, T47, T49, less20_in_gg(T48, T47))
P18_IN_GGA(T48, T47, T49) → LESS20_IN_GG(T48, T47)
LESS20_IN_GG(s(T67), s(T66)) → U1_GG(T67, T66, less20_in_gg(T67, T66))
LESS20_IN_GG(s(T67), s(T66)) → LESS20_IN_GG(T67, T66)
P18_IN_GGA(T52, T47, T53) → U4_GGA(T52, T47, T53, less20_in_gg(T52, T47))
U4_GGA(T52, T47, T53, less20_out_gg(T52, T47)) → U5_GGA(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U4_GGA(T52, T47, T53, less20_out_gg(T52, T47)) → INSERT1_IN_GAG(s(T52), T53, void)
INSERT1_IN_GAG(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_GAG(T98, T95, T99, less33_in_gg(T95, T98))
INSERT1_IN_GAG(T98, tree(T95, void, T99), tree(T95, void, void)) → LESS33_IN_GG(T95, T98)
LESS33_IN_GG(s(T115), s(T117)) → U2_GG(T115, T117, less33_in_gg(T115, T117))
LESS33_IN_GG(s(T115), s(T117)) → LESS33_IN_GG(T115, T117)
INSERT1_IN_GAG(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_GAG(T102, T95, T103, less33_in_gg(T95, T102))
U14_GAG(T102, T95, T103, less33_out_gg(T95, T102)) → U15_GAG(T102, T95, T103, insert1_in_gag(T102, T103, void))
U14_GAG(T102, T95, T103, less33_out_gg(T95, T102)) → INSERT1_IN_GAG(T102, T103, void)
INSERT1_IN_GAG(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_GAG(T144, T141, T145, p43_in_gga(T141, T144, T145))
INSERT1_IN_GAG(T144, tree(T141, void, T145), tree(T141, void, void)) → P43_IN_GGA(T141, T144, T145)
P43_IN_GGA(0, s(T152), T151) → U6_GGA(T152, T151, insert1_in_gag(s(T152), T151, void))
P43_IN_GGA(0, s(T152), T151) → INSERT1_IN_GAG(s(T152), T151, void)
INSERT1_IN_GAG(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_GAG(T213, T214, insert1_in_gag(0, T214, void))
INSERT1_IN_GAG(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_GAG(T235, T234, T236, p18_in_gga(T235, T234, T236))
INSERT1_IN_GAG(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_GAG(T251, T248, T252, p43_in_gga(T248, T251, T252))
P43_IN_GGA(s(T173), s(T175), T176) → U7_GGA(T173, T175, T176, p50_in_gga(T173, T175, T176))
P43_IN_GGA(s(T173), s(T175), T176) → P50_IN_GGA(T173, T175, T176)
P50_IN_GGA(T173, T175, T176) → U8_GGA(T173, T175, T176, less33_in_gg(T173, T175))
P50_IN_GGA(T173, T175, T176) → LESS33_IN_GG(T173, T175)
P50_IN_GGA(T173, T179, T180) → U9_GGA(T173, T179, T180, less33_in_gg(T173, T179))
U9_GGA(T173, T179, T180, less33_out_gg(T173, T179)) → U10_GGA(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
U9_GGA(T173, T179, T180, less33_out_gg(T173, T179)) → INSERT1_IN_GAG(s(T179), T180, void)
INSERT1_IN_GAG(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_GAG(T271, T270, insert1_in_gag(s(T271), T270, void))
INSERT1_IN_GAG(s(T271), tree(0, void, T270), tree(0, void, void)) → INSERT1_IN_GAG(s(T271), T270, void)
INSERT1_IN_GAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_GAG(T294, T292, T295, p50_in_gga(T292, T294, T295))
INSERT1_IN_GAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → P50_IN_GGA(T292, T294, T295)
INSERT1_IN_GAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_GAG(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
INSERT1_IN_GAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T321, T313)
INSERT1_IN_GAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_GAG(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
INSERT1_IN_GAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → LESS20_IN_GG(T332, T331)
INSERT1_IN_GAG(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_GAG(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_GAG(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_GAG(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U24_GAG(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → INSERT1_IN_GAG(s(T336), T337, T313)
INSERT1_IN_GAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_GAG(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
INSERT1_IN_GAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → LESS33_IN_GG(T357, T361)
INSERT1_IN_GAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_GAG(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_GAG(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_GAG(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
U27_GAG(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → INSERT1_IN_GAG(T365, T366, T360)
INSERT1_IN_GAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_GAG(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
INSERT1_IN_GAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_GAG(s(T393), T392, T384)
INSERT1_IN_GAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_GAG(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
INSERT1_IN_GAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → LESS33_IN_GG(T400, T402)
INSERT1_IN_GAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_GAG(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_GAG(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_GAG(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
U31_GAG(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → INSERT1_IN_GAG(s(T406), T407, T384)
INSERT1_IN_GAG(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_GAG(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
INSERT1_IN_GAG(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_GAG(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
INSERT1_IN_GAG(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_GAG(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_GAG(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_GAG(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U35_GAG(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → INSERT1_IN_GAG(s(T448), T449, T425)
INSERT1_IN_GAG(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_GAG(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
INSERT1_IN_GAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_GAG(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_GAG(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_GAG(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
U38_GAG(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → INSERT1_IN_GAG(T477, T478, T472)
INSERT1_IN_GAG(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_GAG(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
INSERT1_IN_GAG(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_GAG(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
INSERT1_IN_GAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_GAG(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_GAG(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_GAG(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U42_GAG(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → INSERT1_IN_GAG(s(T521), T522, T499)
INSERT1_IN_AAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_AAG(T48, T47, T49, p18_in_aga(T48, T47, T49))
INSERT1_IN_AAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → P18_IN_AGA(T48, T47, T49)
P18_IN_AGA(T48, T47, T49) → U3_AGA(T48, T47, T49, less20_in_ag(T48, T47))
P18_IN_AGA(T48, T47, T49) → LESS20_IN_AG(T48, T47)
LESS20_IN_AG(s(T67), s(T66)) → U1_AG(T67, T66, less20_in_ag(T67, T66))
LESS20_IN_AG(s(T67), s(T66)) → LESS20_IN_AG(T67, T66)
P18_IN_AGA(T52, T47, T53) → U4_AGA(T52, T47, T53, less20_in_ag(T52, T47))
U4_AGA(T52, T47, T53, less20_out_ag(T52, T47)) → U5_AGA(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U4_AGA(T52, T47, T53, less20_out_ag(T52, T47)) → INSERT1_IN_GAG(s(T52), T53, void)
INSERT1_IN_AAG(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_AAG(T98, T95, T99, less33_in_ga(T95, T98))
INSERT1_IN_AAG(T98, tree(T95, void, T99), tree(T95, void, void)) → LESS33_IN_GA(T95, T98)
LESS33_IN_GA(s(T115), s(T117)) → U2_GA(T115, T117, less33_in_ga(T115, T117))
LESS33_IN_GA(s(T115), s(T117)) → LESS33_IN_GA(T115, T117)
INSERT1_IN_AAG(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_AAG(T102, T95, T103, less33_in_ga(T95, T102))
U14_AAG(T102, T95, T103, less33_out_ga(T95, T102)) → U15_AAG(T102, T95, T103, insert1_in_aag(T102, T103, void))
U14_AAG(T102, T95, T103, less33_out_ga(T95, T102)) → INSERT1_IN_AAG(T102, T103, void)
INSERT1_IN_AAG(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_AAG(T144, T141, T145, p43_in_gaa(T141, T144, T145))
INSERT1_IN_AAG(T144, tree(T141, void, T145), tree(T141, void, void)) → P43_IN_GAA(T141, T144, T145)
P43_IN_GAA(0, s(T152), T151) → U6_GAA(T152, T151, insert1_in_aag(s(T152), T151, void))
P43_IN_GAA(0, s(T152), T151) → INSERT1_IN_AAG(s(T152), T151, void)
INSERT1_IN_AAG(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_AAG(T213, T214, insert1_in_gag(0, T214, void))
INSERT1_IN_AAG(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_AAG(T235, T234, T236, p18_in_aga(T235, T234, T236))
INSERT1_IN_AAG(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_AAG(T251, T248, T252, p43_in_gaa(T248, T251, T252))
P43_IN_GAA(s(T173), s(T175), T176) → U7_GAA(T173, T175, T176, p50_in_gaa(T173, T175, T176))
P43_IN_GAA(s(T173), s(T175), T176) → P50_IN_GAA(T173, T175, T176)
P50_IN_GAA(T173, T175, T176) → U8_GAA(T173, T175, T176, less33_in_ga(T173, T175))
P50_IN_GAA(T173, T175, T176) → LESS33_IN_GA(T173, T175)
P50_IN_GAA(T173, T179, T180) → U9_GAA(T173, T179, T180, less33_in_ga(T173, T179))
U9_GAA(T173, T179, T180, less33_out_ga(T173, T179)) → U10_GAA(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
U9_GAA(T173, T179, T180, less33_out_ga(T173, T179)) → INSERT1_IN_AAG(s(T179), T180, void)
INSERT1_IN_AAG(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_AAG(T271, T270, insert1_in_aag(s(T271), T270, void))
INSERT1_IN_AAG(s(T271), tree(0, void, T270), tree(0, void, void)) → INSERT1_IN_AAG(s(T271), T270, void)
INSERT1_IN_AAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_AAG(T294, T292, T295, p50_in_gaa(T292, T294, T295))
INSERT1_IN_AAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → P50_IN_GAA(T292, T294, T295)
INSERT1_IN_AAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_AAG(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
INSERT1_IN_AAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T321, T313)
INSERT1_IN_AAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_AAG(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
INSERT1_IN_AAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → LESS20_IN_AG(T332, T331)
INSERT1_IN_AAG(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_AAG(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_AAG(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_AAG(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U24_AAG(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → INSERT1_IN_GAG(s(T336), T337, T313)
INSERT1_IN_AAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_AAG(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
INSERT1_IN_AAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → LESS33_IN_GA(T357, T361)
INSERT1_IN_AAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_AAG(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_AAG(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_AAG(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
U27_AAG(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → INSERT1_IN_AAG(T365, T366, T360)
INSERT1_IN_AAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_AAG(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
INSERT1_IN_AAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_AAG(s(T393), T392, T384)
INSERT1_IN_AAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_AAG(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
INSERT1_IN_AAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → LESS33_IN_GA(T400, T402)
INSERT1_IN_AAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_AAG(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_AAG(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_AAG(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
U31_AAG(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → INSERT1_IN_AAG(s(T406), T407, T384)
INSERT1_IN_AAG(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_AAG(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
INSERT1_IN_AAG(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_AAG(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
INSERT1_IN_AAG(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_AAG(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_AAG(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_AAG(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U35_AAG(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → INSERT1_IN_GAG(s(T448), T449, T425)
INSERT1_IN_AAG(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_AAG(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
INSERT1_IN_AAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_AAG(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_AAG(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_AAG(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
U38_AAG(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → INSERT1_IN_AAG(T477, T478, T472)
INSERT1_IN_AAG(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_AAG(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
INSERT1_IN_AAG(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_AAG(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
INSERT1_IN_AAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_AAG(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_AAG(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_AAG(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U42_AAG(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → INSERT1_IN_AAG(s(T521), T522, T499)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
INSERT1_IN_AAG(x1, x2, x3)  =  INSERT1_IN_AAG(x3)
U11_AAG(x1, x2, x3)  =  U11_AAG(x3)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U11_GAG(x1, x2, x3)  =  U11_GAG(x3)
U12_GAG(x1, x2, x3, x4)  =  U12_GAG(x4)
P18_IN_GGA(x1, x2, x3)  =  P18_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x4)
LESS20_IN_GG(x1, x2)  =  LESS20_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x4)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x4)
U13_GAG(x1, x2, x3, x4)  =  U13_GAG(x4)
LESS33_IN_GG(x1, x2)  =  LESS33_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x3)
U14_GAG(x1, x2, x3, x4)  =  U14_GAG(x1, x4)
U15_GAG(x1, x2, x3, x4)  =  U15_GAG(x4)
U16_GAG(x1, x2, x3, x4)  =  U16_GAG(x4)
P43_IN_GGA(x1, x2, x3)  =  P43_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3)  =  U6_GGA(x3)
U17_GAG(x1, x2, x3)  =  U17_GAG(x3)
U18_GAG(x1, x2, x3, x4)  =  U18_GAG(x4)
U19_GAG(x1, x2, x3, x4)  =  U19_GAG(x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x4)
P50_IN_GGA(x1, x2, x3)  =  P50_IN_GGA(x1, x2)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x4)
U9_GGA(x1, x2, x3, x4)  =  U9_GGA(x2, x4)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x4)
U20_GAG(x1, x2, x3)  =  U20_GAG(x3)
U21_GAG(x1, x2, x3, x4)  =  U21_GAG(x4)
U22_GAG(x1, x2, x3, x4, x5)  =  U22_GAG(x5)
U23_GAG(x1, x2, x3, x4, x5, x6)  =  U23_GAG(x6)
U24_GAG(x1, x2, x3, x4, x5, x6)  =  U24_GAG(x1, x5, x6)
U25_GAG(x1, x2, x3, x4, x5, x6)  =  U25_GAG(x6)
U26_GAG(x1, x2, x3, x4, x5, x6)  =  U26_GAG(x6)
U27_GAG(x1, x2, x3, x4, x5, x6)  =  U27_GAG(x1, x5, x6)
U28_GAG(x1, x2, x3, x4, x5, x6)  =  U28_GAG(x6)
U29_GAG(x1, x2, x3, x4, x5)  =  U29_GAG(x5)
U30_GAG(x1, x2, x3, x4, x5, x6)  =  U30_GAG(x6)
U31_GAG(x1, x2, x3, x4, x5, x6)  =  U31_GAG(x1, x5, x6)
U32_GAG(x1, x2, x3, x4, x5, x6)  =  U32_GAG(x6)
U33_GAG(x1, x2, x3, x4, x5)  =  U33_GAG(x5)
U34_GAG(x1, x2, x3, x4, x5, x6)  =  U34_GAG(x6)
U35_GAG(x1, x2, x3, x4, x5, x6)  =  U35_GAG(x1, x5, x6)
U36_GAG(x1, x2, x3, x4, x5, x6)  =  U36_GAG(x6)
U37_GAG(x1, x2, x3, x4, x5, x6)  =  U37_GAG(x6)
U38_GAG(x1, x2, x3, x4, x5, x6)  =  U38_GAG(x1, x5, x6)
U39_GAG(x1, x2, x3, x4, x5, x6)  =  U39_GAG(x6)
U40_GAG(x1, x2, x3, x4, x5)  =  U40_GAG(x5)
U41_GAG(x1, x2, x3, x4, x5, x6)  =  U41_GAG(x6)
U42_GAG(x1, x2, x3, x4, x5, x6)  =  U42_GAG(x1, x5, x6)
U43_GAG(x1, x2, x3, x4, x5, x6)  =  U43_GAG(x6)
U12_AAG(x1, x2, x3, x4)  =  U12_AAG(x4)
P18_IN_AGA(x1, x2, x3)  =  P18_IN_AGA(x2)
U3_AGA(x1, x2, x3, x4)  =  U3_AGA(x4)
LESS20_IN_AG(x1, x2)  =  LESS20_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x3)
U4_AGA(x1, x2, x3, x4)  =  U4_AGA(x4)
U5_AGA(x1, x2, x3, x4)  =  U5_AGA(x1, x4)
U13_AAG(x1, x2, x3, x4)  =  U13_AAG(x4)
LESS33_IN_GA(x1, x2)  =  LESS33_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x3)
U14_AAG(x1, x2, x3, x4)  =  U14_AAG(x4)
U15_AAG(x1, x2, x3, x4)  =  U15_AAG(x4)
U16_AAG(x1, x2, x3, x4)  =  U16_AAG(x4)
P43_IN_GAA(x1, x2, x3)  =  P43_IN_GAA(x1)
U6_GAA(x1, x2, x3)  =  U6_GAA(x3)
U17_AAG(x1, x2, x3)  =  U17_AAG(x3)
U18_AAG(x1, x2, x3, x4)  =  U18_AAG(x4)
U19_AAG(x1, x2, x3, x4)  =  U19_AAG(x4)
U7_GAA(x1, x2, x3, x4)  =  U7_GAA(x4)
P50_IN_GAA(x1, x2, x3)  =  P50_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4)  =  U8_GAA(x4)
U9_GAA(x1, x2, x3, x4)  =  U9_GAA(x4)
U10_GAA(x1, x2, x3, x4)  =  U10_GAA(x4)
U20_AAG(x1, x2, x3)  =  U20_AAG(x3)
U21_AAG(x1, x2, x3, x4)  =  U21_AAG(x4)
U22_AAG(x1, x2, x3, x4, x5)  =  U22_AAG(x5)
U23_AAG(x1, x2, x3, x4, x5, x6)  =  U23_AAG(x6)
U24_AAG(x1, x2, x3, x4, x5, x6)  =  U24_AAG(x5, x6)
U25_AAG(x1, x2, x3, x4, x5, x6)  =  U25_AAG(x6)
U26_AAG(x1, x2, x3, x4, x5, x6)  =  U26_AAG(x6)
U27_AAG(x1, x2, x3, x4, x5, x6)  =  U27_AAG(x5, x6)
U28_AAG(x1, x2, x3, x4, x5, x6)  =  U28_AAG(x6)
U29_AAG(x1, x2, x3, x4, x5)  =  U29_AAG(x5)
U30_AAG(x1, x2, x3, x4, x5, x6)  =  U30_AAG(x6)
U31_AAG(x1, x2, x3, x4, x5, x6)  =  U31_AAG(x5, x6)
U32_AAG(x1, x2, x3, x4, x5, x6)  =  U32_AAG(x6)
U33_AAG(x1, x2, x3, x4, x5)  =  U33_AAG(x5)
U34_AAG(x1, x2, x3, x4, x5, x6)  =  U34_AAG(x6)
U35_AAG(x1, x2, x3, x4, x5, x6)  =  U35_AAG(x5, x6)
U36_AAG(x1, x2, x3, x4, x5, x6)  =  U36_AAG(x6)
U37_AAG(x1, x2, x3, x4, x5, x6)  =  U37_AAG(x6)
U38_AAG(x1, x2, x3, x4, x5, x6)  =  U38_AAG(x5, x6)
U39_AAG(x1, x2, x3, x4, x5, x6)  =  U39_AAG(x6)
U40_AAG(x1, x2, x3, x4, x5)  =  U40_AAG(x5)
U41_AAG(x1, x2, x3, x4, x5, x6)  =  U41_AAG(x6)
U42_AAG(x1, x2, x3, x4, x5, x6)  =  U42_AAG(x5, x6)
U43_AAG(x1, x2, x3, x4, x5, x6)  =  U43_AAG(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_AAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_AAG(T26, T27, insert1_in_gag(0, T27, void))
INSERT1_IN_AAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → INSERT1_IN_GAG(0, T27, void)
INSERT1_IN_GAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_GAG(T26, T27, insert1_in_gag(0, T27, void))
INSERT1_IN_GAG(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → INSERT1_IN_GAG(0, T27, void)
INSERT1_IN_GAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_GAG(T48, T47, T49, p18_in_gga(T48, T47, T49))
INSERT1_IN_GAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → P18_IN_GGA(T48, T47, T49)
P18_IN_GGA(T48, T47, T49) → U3_GGA(T48, T47, T49, less20_in_gg(T48, T47))
P18_IN_GGA(T48, T47, T49) → LESS20_IN_GG(T48, T47)
LESS20_IN_GG(s(T67), s(T66)) → U1_GG(T67, T66, less20_in_gg(T67, T66))
LESS20_IN_GG(s(T67), s(T66)) → LESS20_IN_GG(T67, T66)
P18_IN_GGA(T52, T47, T53) → U4_GGA(T52, T47, T53, less20_in_gg(T52, T47))
U4_GGA(T52, T47, T53, less20_out_gg(T52, T47)) → U5_GGA(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U4_GGA(T52, T47, T53, less20_out_gg(T52, T47)) → INSERT1_IN_GAG(s(T52), T53, void)
INSERT1_IN_GAG(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_GAG(T98, T95, T99, less33_in_gg(T95, T98))
INSERT1_IN_GAG(T98, tree(T95, void, T99), tree(T95, void, void)) → LESS33_IN_GG(T95, T98)
LESS33_IN_GG(s(T115), s(T117)) → U2_GG(T115, T117, less33_in_gg(T115, T117))
LESS33_IN_GG(s(T115), s(T117)) → LESS33_IN_GG(T115, T117)
INSERT1_IN_GAG(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_GAG(T102, T95, T103, less33_in_gg(T95, T102))
U14_GAG(T102, T95, T103, less33_out_gg(T95, T102)) → U15_GAG(T102, T95, T103, insert1_in_gag(T102, T103, void))
U14_GAG(T102, T95, T103, less33_out_gg(T95, T102)) → INSERT1_IN_GAG(T102, T103, void)
INSERT1_IN_GAG(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_GAG(T144, T141, T145, p43_in_gga(T141, T144, T145))
INSERT1_IN_GAG(T144, tree(T141, void, T145), tree(T141, void, void)) → P43_IN_GGA(T141, T144, T145)
P43_IN_GGA(0, s(T152), T151) → U6_GGA(T152, T151, insert1_in_gag(s(T152), T151, void))
P43_IN_GGA(0, s(T152), T151) → INSERT1_IN_GAG(s(T152), T151, void)
INSERT1_IN_GAG(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_GAG(T213, T214, insert1_in_gag(0, T214, void))
INSERT1_IN_GAG(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_GAG(T235, T234, T236, p18_in_gga(T235, T234, T236))
INSERT1_IN_GAG(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_GAG(T251, T248, T252, p43_in_gga(T248, T251, T252))
P43_IN_GGA(s(T173), s(T175), T176) → U7_GGA(T173, T175, T176, p50_in_gga(T173, T175, T176))
P43_IN_GGA(s(T173), s(T175), T176) → P50_IN_GGA(T173, T175, T176)
P50_IN_GGA(T173, T175, T176) → U8_GGA(T173, T175, T176, less33_in_gg(T173, T175))
P50_IN_GGA(T173, T175, T176) → LESS33_IN_GG(T173, T175)
P50_IN_GGA(T173, T179, T180) → U9_GGA(T173, T179, T180, less33_in_gg(T173, T179))
U9_GGA(T173, T179, T180, less33_out_gg(T173, T179)) → U10_GGA(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
U9_GGA(T173, T179, T180, less33_out_gg(T173, T179)) → INSERT1_IN_GAG(s(T179), T180, void)
INSERT1_IN_GAG(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_GAG(T271, T270, insert1_in_gag(s(T271), T270, void))
INSERT1_IN_GAG(s(T271), tree(0, void, T270), tree(0, void, void)) → INSERT1_IN_GAG(s(T271), T270, void)
INSERT1_IN_GAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_GAG(T294, T292, T295, p50_in_gga(T292, T294, T295))
INSERT1_IN_GAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → P50_IN_GGA(T292, T294, T295)
INSERT1_IN_GAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_GAG(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
INSERT1_IN_GAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T321, T313)
INSERT1_IN_GAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_GAG(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
INSERT1_IN_GAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → LESS20_IN_GG(T332, T331)
INSERT1_IN_GAG(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_GAG(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_GAG(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_GAG(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U24_GAG(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → INSERT1_IN_GAG(s(T336), T337, T313)
INSERT1_IN_GAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_GAG(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
INSERT1_IN_GAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → LESS33_IN_GG(T357, T361)
INSERT1_IN_GAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_GAG(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_GAG(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_GAG(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
U27_GAG(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → INSERT1_IN_GAG(T365, T366, T360)
INSERT1_IN_GAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_GAG(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
INSERT1_IN_GAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_GAG(s(T393), T392, T384)
INSERT1_IN_GAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_GAG(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
INSERT1_IN_GAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → LESS33_IN_GG(T400, T402)
INSERT1_IN_GAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_GAG(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_GAG(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_GAG(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
U31_GAG(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → INSERT1_IN_GAG(s(T406), T407, T384)
INSERT1_IN_GAG(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_GAG(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
INSERT1_IN_GAG(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_GAG(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
INSERT1_IN_GAG(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_GAG(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_GAG(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_GAG(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U35_GAG(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → INSERT1_IN_GAG(s(T448), T449, T425)
INSERT1_IN_GAG(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_GAG(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
INSERT1_IN_GAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_GAG(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_GAG(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_GAG(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
U38_GAG(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → INSERT1_IN_GAG(T477, T478, T472)
INSERT1_IN_GAG(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_GAG(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
INSERT1_IN_GAG(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_GAG(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
INSERT1_IN_GAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_GAG(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_GAG(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_GAG(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U42_GAG(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → INSERT1_IN_GAG(s(T521), T522, T499)
INSERT1_IN_AAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_AAG(T48, T47, T49, p18_in_aga(T48, T47, T49))
INSERT1_IN_AAG(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → P18_IN_AGA(T48, T47, T49)
P18_IN_AGA(T48, T47, T49) → U3_AGA(T48, T47, T49, less20_in_ag(T48, T47))
P18_IN_AGA(T48, T47, T49) → LESS20_IN_AG(T48, T47)
LESS20_IN_AG(s(T67), s(T66)) → U1_AG(T67, T66, less20_in_ag(T67, T66))
LESS20_IN_AG(s(T67), s(T66)) → LESS20_IN_AG(T67, T66)
P18_IN_AGA(T52, T47, T53) → U4_AGA(T52, T47, T53, less20_in_ag(T52, T47))
U4_AGA(T52, T47, T53, less20_out_ag(T52, T47)) → U5_AGA(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U4_AGA(T52, T47, T53, less20_out_ag(T52, T47)) → INSERT1_IN_GAG(s(T52), T53, void)
INSERT1_IN_AAG(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_AAG(T98, T95, T99, less33_in_ga(T95, T98))
INSERT1_IN_AAG(T98, tree(T95, void, T99), tree(T95, void, void)) → LESS33_IN_GA(T95, T98)
LESS33_IN_GA(s(T115), s(T117)) → U2_GA(T115, T117, less33_in_ga(T115, T117))
LESS33_IN_GA(s(T115), s(T117)) → LESS33_IN_GA(T115, T117)
INSERT1_IN_AAG(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_AAG(T102, T95, T103, less33_in_ga(T95, T102))
U14_AAG(T102, T95, T103, less33_out_ga(T95, T102)) → U15_AAG(T102, T95, T103, insert1_in_aag(T102, T103, void))
U14_AAG(T102, T95, T103, less33_out_ga(T95, T102)) → INSERT1_IN_AAG(T102, T103, void)
INSERT1_IN_AAG(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_AAG(T144, T141, T145, p43_in_gaa(T141, T144, T145))
INSERT1_IN_AAG(T144, tree(T141, void, T145), tree(T141, void, void)) → P43_IN_GAA(T141, T144, T145)
P43_IN_GAA(0, s(T152), T151) → U6_GAA(T152, T151, insert1_in_aag(s(T152), T151, void))
P43_IN_GAA(0, s(T152), T151) → INSERT1_IN_AAG(s(T152), T151, void)
INSERT1_IN_AAG(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_AAG(T213, T214, insert1_in_gag(0, T214, void))
INSERT1_IN_AAG(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_AAG(T235, T234, T236, p18_in_aga(T235, T234, T236))
INSERT1_IN_AAG(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_AAG(T251, T248, T252, p43_in_gaa(T248, T251, T252))
P43_IN_GAA(s(T173), s(T175), T176) → U7_GAA(T173, T175, T176, p50_in_gaa(T173, T175, T176))
P43_IN_GAA(s(T173), s(T175), T176) → P50_IN_GAA(T173, T175, T176)
P50_IN_GAA(T173, T175, T176) → U8_GAA(T173, T175, T176, less33_in_ga(T173, T175))
P50_IN_GAA(T173, T175, T176) → LESS33_IN_GA(T173, T175)
P50_IN_GAA(T173, T179, T180) → U9_GAA(T173, T179, T180, less33_in_ga(T173, T179))
U9_GAA(T173, T179, T180, less33_out_ga(T173, T179)) → U10_GAA(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
U9_GAA(T173, T179, T180, less33_out_ga(T173, T179)) → INSERT1_IN_AAG(s(T179), T180, void)
INSERT1_IN_AAG(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_AAG(T271, T270, insert1_in_aag(s(T271), T270, void))
INSERT1_IN_AAG(s(T271), tree(0, void, T270), tree(0, void, void)) → INSERT1_IN_AAG(s(T271), T270, void)
INSERT1_IN_AAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_AAG(T294, T292, T295, p50_in_gaa(T292, T294, T295))
INSERT1_IN_AAG(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → P50_IN_GAA(T292, T294, T295)
INSERT1_IN_AAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_AAG(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
INSERT1_IN_AAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T321, T313)
INSERT1_IN_AAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_AAG(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
INSERT1_IN_AAG(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → LESS20_IN_AG(T332, T331)
INSERT1_IN_AAG(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_AAG(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_AAG(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_AAG(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U24_AAG(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → INSERT1_IN_GAG(s(T336), T337, T313)
INSERT1_IN_AAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_AAG(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
INSERT1_IN_AAG(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → LESS33_IN_GA(T357, T361)
INSERT1_IN_AAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_AAG(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_AAG(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_AAG(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
U27_AAG(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → INSERT1_IN_AAG(T365, T366, T360)
INSERT1_IN_AAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_AAG(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
INSERT1_IN_AAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_AAG(s(T393), T392, T384)
INSERT1_IN_AAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_AAG(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
INSERT1_IN_AAG(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → LESS33_IN_GA(T400, T402)
INSERT1_IN_AAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_AAG(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_AAG(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_AAG(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
U31_AAG(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → INSERT1_IN_AAG(s(T406), T407, T384)
INSERT1_IN_AAG(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_AAG(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
INSERT1_IN_AAG(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_AAG(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
INSERT1_IN_AAG(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_AAG(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_AAG(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_AAG(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U35_AAG(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → INSERT1_IN_GAG(s(T448), T449, T425)
INSERT1_IN_AAG(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_AAG(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
INSERT1_IN_AAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_AAG(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_AAG(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_AAG(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
U38_AAG(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → INSERT1_IN_AAG(T477, T478, T472)
INSERT1_IN_AAG(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_AAG(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
INSERT1_IN_AAG(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_AAG(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
INSERT1_IN_AAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_AAG(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_AAG(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_AAG(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U42_AAG(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → INSERT1_IN_AAG(s(T521), T522, T499)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
INSERT1_IN_AAG(x1, x2, x3)  =  INSERT1_IN_AAG(x3)
U11_AAG(x1, x2, x3)  =  U11_AAG(x3)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U11_GAG(x1, x2, x3)  =  U11_GAG(x3)
U12_GAG(x1, x2, x3, x4)  =  U12_GAG(x4)
P18_IN_GGA(x1, x2, x3)  =  P18_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4)  =  U3_GGA(x4)
LESS20_IN_GG(x1, x2)  =  LESS20_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x3)
U4_GGA(x1, x2, x3, x4)  =  U4_GGA(x1, x4)
U5_GGA(x1, x2, x3, x4)  =  U5_GGA(x4)
U13_GAG(x1, x2, x3, x4)  =  U13_GAG(x4)
LESS33_IN_GG(x1, x2)  =  LESS33_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x3)
U14_GAG(x1, x2, x3, x4)  =  U14_GAG(x1, x4)
U15_GAG(x1, x2, x3, x4)  =  U15_GAG(x4)
U16_GAG(x1, x2, x3, x4)  =  U16_GAG(x4)
P43_IN_GGA(x1, x2, x3)  =  P43_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3)  =  U6_GGA(x3)
U17_GAG(x1, x2, x3)  =  U17_GAG(x3)
U18_GAG(x1, x2, x3, x4)  =  U18_GAG(x4)
U19_GAG(x1, x2, x3, x4)  =  U19_GAG(x4)
U7_GGA(x1, x2, x3, x4)  =  U7_GGA(x4)
P50_IN_GGA(x1, x2, x3)  =  P50_IN_GGA(x1, x2)
U8_GGA(x1, x2, x3, x4)  =  U8_GGA(x4)
U9_GGA(x1, x2, x3, x4)  =  U9_GGA(x2, x4)
U10_GGA(x1, x2, x3, x4)  =  U10_GGA(x4)
U20_GAG(x1, x2, x3)  =  U20_GAG(x3)
U21_GAG(x1, x2, x3, x4)  =  U21_GAG(x4)
U22_GAG(x1, x2, x3, x4, x5)  =  U22_GAG(x5)
U23_GAG(x1, x2, x3, x4, x5, x6)  =  U23_GAG(x6)
U24_GAG(x1, x2, x3, x4, x5, x6)  =  U24_GAG(x1, x5, x6)
U25_GAG(x1, x2, x3, x4, x5, x6)  =  U25_GAG(x6)
U26_GAG(x1, x2, x3, x4, x5, x6)  =  U26_GAG(x6)
U27_GAG(x1, x2, x3, x4, x5, x6)  =  U27_GAG(x1, x5, x6)
U28_GAG(x1, x2, x3, x4, x5, x6)  =  U28_GAG(x6)
U29_GAG(x1, x2, x3, x4, x5)  =  U29_GAG(x5)
U30_GAG(x1, x2, x3, x4, x5, x6)  =  U30_GAG(x6)
U31_GAG(x1, x2, x3, x4, x5, x6)  =  U31_GAG(x1, x5, x6)
U32_GAG(x1, x2, x3, x4, x5, x6)  =  U32_GAG(x6)
U33_GAG(x1, x2, x3, x4, x5)  =  U33_GAG(x5)
U34_GAG(x1, x2, x3, x4, x5, x6)  =  U34_GAG(x6)
U35_GAG(x1, x2, x3, x4, x5, x6)  =  U35_GAG(x1, x5, x6)
U36_GAG(x1, x2, x3, x4, x5, x6)  =  U36_GAG(x6)
U37_GAG(x1, x2, x3, x4, x5, x6)  =  U37_GAG(x6)
U38_GAG(x1, x2, x3, x4, x5, x6)  =  U38_GAG(x1, x5, x6)
U39_GAG(x1, x2, x3, x4, x5, x6)  =  U39_GAG(x6)
U40_GAG(x1, x2, x3, x4, x5)  =  U40_GAG(x5)
U41_GAG(x1, x2, x3, x4, x5, x6)  =  U41_GAG(x6)
U42_GAG(x1, x2, x3, x4, x5, x6)  =  U42_GAG(x1, x5, x6)
U43_GAG(x1, x2, x3, x4, x5, x6)  =  U43_GAG(x6)
U12_AAG(x1, x2, x3, x4)  =  U12_AAG(x4)
P18_IN_AGA(x1, x2, x3)  =  P18_IN_AGA(x2)
U3_AGA(x1, x2, x3, x4)  =  U3_AGA(x4)
LESS20_IN_AG(x1, x2)  =  LESS20_IN_AG(x2)
U1_AG(x1, x2, x3)  =  U1_AG(x3)
U4_AGA(x1, x2, x3, x4)  =  U4_AGA(x4)
U5_AGA(x1, x2, x3, x4)  =  U5_AGA(x1, x4)
U13_AAG(x1, x2, x3, x4)  =  U13_AAG(x4)
LESS33_IN_GA(x1, x2)  =  LESS33_IN_GA(x1)
U2_GA(x1, x2, x3)  =  U2_GA(x3)
U14_AAG(x1, x2, x3, x4)  =  U14_AAG(x4)
U15_AAG(x1, x2, x3, x4)  =  U15_AAG(x4)
U16_AAG(x1, x2, x3, x4)  =  U16_AAG(x4)
P43_IN_GAA(x1, x2, x3)  =  P43_IN_GAA(x1)
U6_GAA(x1, x2, x3)  =  U6_GAA(x3)
U17_AAG(x1, x2, x3)  =  U17_AAG(x3)
U18_AAG(x1, x2, x3, x4)  =  U18_AAG(x4)
U19_AAG(x1, x2, x3, x4)  =  U19_AAG(x4)
U7_GAA(x1, x2, x3, x4)  =  U7_GAA(x4)
P50_IN_GAA(x1, x2, x3)  =  P50_IN_GAA(x1)
U8_GAA(x1, x2, x3, x4)  =  U8_GAA(x4)
U9_GAA(x1, x2, x3, x4)  =  U9_GAA(x4)
U10_GAA(x1, x2, x3, x4)  =  U10_GAA(x4)
U20_AAG(x1, x2, x3)  =  U20_AAG(x3)
U21_AAG(x1, x2, x3, x4)  =  U21_AAG(x4)
U22_AAG(x1, x2, x3, x4, x5)  =  U22_AAG(x5)
U23_AAG(x1, x2, x3, x4, x5, x6)  =  U23_AAG(x6)
U24_AAG(x1, x2, x3, x4, x5, x6)  =  U24_AAG(x5, x6)
U25_AAG(x1, x2, x3, x4, x5, x6)  =  U25_AAG(x6)
U26_AAG(x1, x2, x3, x4, x5, x6)  =  U26_AAG(x6)
U27_AAG(x1, x2, x3, x4, x5, x6)  =  U27_AAG(x5, x6)
U28_AAG(x1, x2, x3, x4, x5, x6)  =  U28_AAG(x6)
U29_AAG(x1, x2, x3, x4, x5)  =  U29_AAG(x5)
U30_AAG(x1, x2, x3, x4, x5, x6)  =  U30_AAG(x6)
U31_AAG(x1, x2, x3, x4, x5, x6)  =  U31_AAG(x5, x6)
U32_AAG(x1, x2, x3, x4, x5, x6)  =  U32_AAG(x6)
U33_AAG(x1, x2, x3, x4, x5)  =  U33_AAG(x5)
U34_AAG(x1, x2, x3, x4, x5, x6)  =  U34_AAG(x6)
U35_AAG(x1, x2, x3, x4, x5, x6)  =  U35_AAG(x5, x6)
U36_AAG(x1, x2, x3, x4, x5, x6)  =  U36_AAG(x6)
U37_AAG(x1, x2, x3, x4, x5, x6)  =  U37_AAG(x6)
U38_AAG(x1, x2, x3, x4, x5, x6)  =  U38_AAG(x5, x6)
U39_AAG(x1, x2, x3, x4, x5, x6)  =  U39_AAG(x6)
U40_AAG(x1, x2, x3, x4, x5)  =  U40_AAG(x5)
U41_AAG(x1, x2, x3, x4, x5, x6)  =  U41_AAG(x6)
U42_AAG(x1, x2, x3, x4, x5, x6)  =  U42_AAG(x5, x6)
U43_AAG(x1, x2, x3, x4, x5, x6)  =  U43_AAG(x6)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 6 SCCs with 111 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

LESS33_IN_GA(s(T115), s(T117)) → LESS33_IN_GA(T115, T117)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
LESS33_IN_GA(x1, x2)  =  LESS33_IN_GA(x1)

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:

LESS33_IN_GA(s(T115), s(T117)) → LESS33_IN_GA(T115, T117)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LESS33_IN_GA(x1, x2)  =  LESS33_IN_GA(x1)

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

(12) PiDPToQDPProof (SOUND 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:

LESS33_IN_GA(s(T115)) → LESS33_IN_GA(T115)

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:

  • LESS33_IN_GA(s(T115)) → LESS33_IN_GA(T115)
    The graph contains the following edges 1 > 1

(15) YES

(16) Obligation:

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

LESS20_IN_AG(s(T67), s(T66)) → LESS20_IN_AG(T67, T66)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
LESS20_IN_AG(x1, x2)  =  LESS20_IN_AG(x2)

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:

LESS20_IN_AG(s(T67), s(T66)) → LESS20_IN_AG(T67, T66)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
LESS20_IN_AG(x1, x2)  =  LESS20_IN_AG(x2)

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

(19) PiDPToQDPProof (SOUND 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:

LESS20_IN_AG(s(T66)) → LESS20_IN_AG(T66)

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:

  • LESS20_IN_AG(s(T66)) → LESS20_IN_AG(T66)
    The graph contains the following edges 1 > 1

(22) YES

(23) Obligation:

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

LESS33_IN_GG(s(T115), s(T117)) → LESS33_IN_GG(T115, T117)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
LESS33_IN_GG(x1, x2)  =  LESS33_IN_GG(x1, x2)

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:

LESS33_IN_GG(s(T115), s(T117)) → LESS33_IN_GG(T115, T117)

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

(26) PiDPToQDPProof (EQUIVALENT 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:

LESS33_IN_GG(s(T115), s(T117)) → LESS33_IN_GG(T115, T117)

R is empty.
Q is empty.
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:

  • LESS33_IN_GG(s(T115), s(T117)) → LESS33_IN_GG(T115, T117)
    The graph contains the following edges 1 > 1, 2 > 2

(29) YES

(30) Obligation:

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

LESS20_IN_GG(s(T67), s(T66)) → LESS20_IN_GG(T67, T66)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
LESS20_IN_GG(x1, x2)  =  LESS20_IN_GG(x1, x2)

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

(31) UsableRulesProof (EQUIVALENT transformation)

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

(32) Obligation:

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

LESS20_IN_GG(s(T67), s(T66)) → LESS20_IN_GG(T67, T66)

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

(33) PiDPToQDPProof (EQUIVALENT transformation)

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

(34) Obligation:

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

LESS20_IN_GG(s(T67), s(T66)) → LESS20_IN_GG(T67, T66)

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

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

  • LESS20_IN_GG(s(T67), s(T66)) → LESS20_IN_GG(T67, T66)
    The graph contains the following edges 1 > 1, 2 > 2

(36) YES

(37) Obligation:

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

INSERT1_IN_GAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_GAG(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_GAG(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → INSERT1_IN_GAG(T365, T366, T360)
INSERT1_IN_GAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T321, T313)
INSERT1_IN_GAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_GAG(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_GAG(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → INSERT1_IN_GAG(T477, T478, T472)
INSERT1_IN_GAG(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_GAG(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_GAG(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → INSERT1_IN_GAG(s(T336), T337, T313)
INSERT1_IN_GAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_GAG(s(T393), T392, T384)
INSERT1_IN_GAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_GAG(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_GAG(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → INSERT1_IN_GAG(s(T406), T407, T384)
INSERT1_IN_GAG(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_GAG(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_GAG(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → INSERT1_IN_GAG(s(T448), T449, T425)
INSERT1_IN_GAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_GAG(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_GAG(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → INSERT1_IN_GAG(s(T521), T522, T499)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U24_GAG(x1, x2, x3, x4, x5, x6)  =  U24_GAG(x1, x5, x6)
U27_GAG(x1, x2, x3, x4, x5, x6)  =  U27_GAG(x1, x5, x6)
U31_GAG(x1, x2, x3, x4, x5, x6)  =  U31_GAG(x1, x5, x6)
U35_GAG(x1, x2, x3, x4, x5, x6)  =  U35_GAG(x1, x5, x6)
U38_GAG(x1, x2, x3, x4, x5, x6)  =  U38_GAG(x1, x5, x6)
U42_GAG(x1, x2, x3, x4, x5, x6)  =  U42_GAG(x1, x5, x6)

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

(38) UsableRulesProof (EQUIVALENT transformation)

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

(39) Obligation:

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

INSERT1_IN_GAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_GAG(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_GAG(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → INSERT1_IN_GAG(T365, T366, T360)
INSERT1_IN_GAG(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T321, T313)
INSERT1_IN_GAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_GAG(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_GAG(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → INSERT1_IN_GAG(T477, T478, T472)
INSERT1_IN_GAG(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_GAG(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_GAG(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → INSERT1_IN_GAG(s(T336), T337, T313)
INSERT1_IN_GAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_GAG(s(T393), T392, T384)
INSERT1_IN_GAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_GAG(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_GAG(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → INSERT1_IN_GAG(s(T406), T407, T384)
INSERT1_IN_GAG(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_GAG(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_GAG(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → INSERT1_IN_GAG(s(T448), T449, T425)
INSERT1_IN_GAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_GAG(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_GAG(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → INSERT1_IN_GAG(s(T521), T522, T499)

The TRS R consists of the following rules:

less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
0  =  0
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
INSERT1_IN_GAG(x1, x2, x3)  =  INSERT1_IN_GAG(x1, x3)
U24_GAG(x1, x2, x3, x4, x5, x6)  =  U24_GAG(x1, x5, x6)
U27_GAG(x1, x2, x3, x4, x5, x6)  =  U27_GAG(x1, x5, x6)
U31_GAG(x1, x2, x3, x4, x5, x6)  =  U31_GAG(x1, x5, x6)
U35_GAG(x1, x2, x3, x4, x5, x6)  =  U35_GAG(x1, x5, x6)
U38_GAG(x1, x2, x3, x4, x5, x6)  =  U38_GAG(x1, x5, x6)
U42_GAG(x1, x2, x3, x4, x5, x6)  =  U42_GAG(x1, x5, x6)

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

(40) PiDPToQDPProof (SOUND transformation)

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

(41) Obligation:

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

INSERT1_IN_GAG(T365, tree(T357, T369, T360)) → U27_GAG(T365, T360, less33_in_gg(T357, T365))
U27_GAG(T365, T360, less33_out_gg) → INSERT1_IN_GAG(T365, T360)
INSERT1_IN_GAG(0, tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T313)
INSERT1_IN_GAG(T477, tree(T469, T481, T472)) → U38_GAG(T477, T472, less33_in_gg(T469, T477))
U38_GAG(T477, T472, less33_out_gg) → INSERT1_IN_GAG(T477, T472)
INSERT1_IN_GAG(s(T336), tree(s(T331), T313, T340)) → U24_GAG(T336, T313, less20_in_gg(T336, T331))
U24_GAG(T336, T313, less20_out_gg) → INSERT1_IN_GAG(s(T336), T313)
INSERT1_IN_GAG(s(T393), tree(0, T382, T384)) → INSERT1_IN_GAG(s(T393), T384)
INSERT1_IN_GAG(s(T406), tree(s(T400), T410, T384)) → U31_GAG(T406, T384, less33_in_gg(T400, T406))
U31_GAG(T406, T384, less33_out_gg) → INSERT1_IN_GAG(s(T406), T384)
INSERT1_IN_GAG(s(T448), tree(s(T443), T425, T452)) → U35_GAG(T448, T425, less20_in_gg(T448, T443))
U35_GAG(T448, T425, less20_out_gg) → INSERT1_IN_GAG(s(T448), T425)
INSERT1_IN_GAG(s(T521), tree(s(T515), T525, T499)) → U42_GAG(T521, T499, less33_in_gg(T515, T521))
U42_GAG(T521, T499, less33_out_gg) → INSERT1_IN_GAG(s(T521), T499)

The TRS R consists of the following rules:

less33_in_gg(0, s(T110)) → less33_out_gg
less33_in_gg(s(T115), s(T117)) → U2_gg(less33_in_gg(T115, T117))
less20_in_gg(0, s(T60)) → less20_out_gg
less20_in_gg(s(T67), s(T66)) → U1_gg(less20_in_gg(T67, T66))
U2_gg(less33_out_gg) → less33_out_gg
U1_gg(less20_out_gg) → less20_out_gg

The set Q consists of the following terms:

less33_in_gg(x0, x1)
less20_in_gg(x0, x1)
U2_gg(x0)
U1_gg(x0)

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

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

  • U27_GAG(T365, T360, less33_out_gg) → INSERT1_IN_GAG(T365, T360)
    The graph contains the following edges 1 >= 1, 2 >= 2

  • INSERT1_IN_GAG(T365, tree(T357, T369, T360)) → U27_GAG(T365, T360, less33_in_gg(T357, T365))
    The graph contains the following edges 1 >= 1, 2 > 2

  • INSERT1_IN_GAG(0, tree(s(T320), T313, T312)) → INSERT1_IN_GAG(0, T313)
    The graph contains the following edges 1 >= 1, 2 > 2

  • INSERT1_IN_GAG(s(T393), tree(0, T382, T384)) → INSERT1_IN_GAG(s(T393), T384)
    The graph contains the following edges 1 >= 1, 2 > 2

  • U38_GAG(T477, T472, less33_out_gg) → INSERT1_IN_GAG(T477, T472)
    The graph contains the following edges 1 >= 1, 2 >= 2

  • INSERT1_IN_GAG(T477, tree(T469, T481, T472)) → U38_GAG(T477, T472, less33_in_gg(T469, T477))
    The graph contains the following edges 1 >= 1, 2 > 2

  • U24_GAG(T336, T313, less20_out_gg) → INSERT1_IN_GAG(s(T336), T313)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(s(T336), tree(s(T331), T313, T340)) → U24_GAG(T336, T313, less20_in_gg(T336, T331))
    The graph contains the following edges 1 > 1, 2 > 2

  • U31_GAG(T406, T384, less33_out_gg) → INSERT1_IN_GAG(s(T406), T384)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(s(T406), tree(s(T400), T410, T384)) → U31_GAG(T406, T384, less33_in_gg(T400, T406))
    The graph contains the following edges 1 > 1, 2 > 2

  • U35_GAG(T448, T425, less20_out_gg) → INSERT1_IN_GAG(s(T448), T425)
    The graph contains the following edges 2 >= 2

  • U42_GAG(T521, T499, less33_out_gg) → INSERT1_IN_GAG(s(T521), T499)
    The graph contains the following edges 2 >= 2

  • INSERT1_IN_GAG(s(T448), tree(s(T443), T425, T452)) → U35_GAG(T448, T425, less20_in_gg(T448, T443))
    The graph contains the following edges 1 > 1, 2 > 2

  • INSERT1_IN_GAG(s(T521), tree(s(T515), T525, T499)) → U42_GAG(T521, T499, less33_in_gg(T515, T521))
    The graph contains the following edges 1 > 1, 2 > 2

(43) YES

(44) Obligation:

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

INSERT1_IN_AAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_AAG(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_AAG(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → INSERT1_IN_AAG(T365, T366, T360)
INSERT1_IN_AAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_AAG(s(T393), T392, T384)
INSERT1_IN_AAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_AAG(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_AAG(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → INSERT1_IN_AAG(s(T406), T407, T384)
INSERT1_IN_AAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_AAG(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_AAG(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → INSERT1_IN_AAG(T477, T478, T472)
INSERT1_IN_AAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_AAG(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_AAG(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → INSERT1_IN_AAG(s(T521), T522, T499)

The TRS R consists of the following rules:

insert1_in_aag(T5, void, tree(T5, void, void)) → insert1_out_aag(T5, void, tree(T5, void, void))
insert1_in_aag(T9, tree(T9, void, void), tree(T9, void, void)) → insert1_out_aag(T9, tree(T9, void, void), tree(T9, void, void))
insert1_in_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_aag(T26, T27, insert1_in_gag(0, T27, void))
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(0, tree(s(T26), T27, void), tree(s(T26), void, void)) → U11_gag(T26, T27, insert1_in_gag(0, T27, void))
insert1_in_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_gag(T48, T47, T49, p18_in_gga(T48, T47, T49))
p18_in_gga(T48, T47, T49) → U3_gga(T48, T47, T49, less20_in_gg(T48, T47))
less20_in_gg(0, s(T60)) → less20_out_gg(0, s(T60))
less20_in_gg(s(T67), s(T66)) → U1_gg(T67, T66, less20_in_gg(T67, T66))
U1_gg(T67, T66, less20_out_gg(T67, T66)) → less20_out_gg(s(T67), s(T66))
U3_gga(T48, T47, T49, less20_out_gg(T48, T47)) → p18_out_gga(T48, T47, T49)
p18_in_gga(T52, T47, T53) → U4_gga(T52, T47, T53, less20_in_gg(T52, T47))
U4_gga(T52, T47, T53, less20_out_gg(T52, T47)) → U5_gga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
insert1_in_gag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_gag(T98, T95, T99, less33_in_gg(T95, T98))
less33_in_gg(0, s(T110)) → less33_out_gg(0, s(T110))
less33_in_gg(s(T115), s(T117)) → U2_gg(T115, T117, less33_in_gg(T115, T117))
U2_gg(T115, T117, less33_out_gg(T115, T117)) → less33_out_gg(s(T115), s(T117))
U13_gag(T98, T95, T99, less33_out_gg(T95, T98)) → insert1_out_gag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_gag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_gag(T102, T95, T103, less33_in_gg(T95, T102))
U14_gag(T102, T95, T103, less33_out_gg(T95, T102)) → U15_gag(T102, T95, T103, insert1_in_gag(T102, T103, void))
insert1_in_gag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_gag(T144, T141, T145, p43_in_gga(T141, T144, T145))
p43_in_gga(0, s(T152), T151) → U6_gga(T152, T151, insert1_in_gag(s(T152), T151, void))
insert1_in_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_gag(T213, T214, insert1_in_gag(0, T214, void))
insert1_in_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_gag(T235, T234, T236, p18_in_gga(T235, T234, T236))
U18_gag(T235, T234, T236, p18_out_gga(T235, T234, T236)) → insert1_out_gag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_gag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_gag(T251, T248, T252, p43_in_gga(T248, T251, T252))
p43_in_gga(s(T173), s(T175), T176) → U7_gga(T173, T175, T176, p50_in_gga(T173, T175, T176))
p50_in_gga(T173, T175, T176) → U8_gga(T173, T175, T176, less33_in_gg(T173, T175))
U8_gga(T173, T175, T176, less33_out_gg(T173, T175)) → p50_out_gga(T173, T175, T176)
p50_in_gga(T173, T179, T180) → U9_gga(T173, T179, T180, less33_in_gg(T173, T179))
U9_gga(T173, T179, T180, less33_out_gg(T173, T179)) → U10_gga(T173, T179, T180, insert1_in_gag(s(T179), T180, void))
insert1_in_gag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_gag(T271, T270, insert1_in_gag(s(T271), T270, void))
insert1_in_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_gag(T294, T292, T295, p50_in_gga(T292, T294, T295))
U21_gag(T294, T292, T295, p50_out_gga(T292, T294, T295)) → insert1_out_gag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_gag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_gag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
insert1_in_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_gag(T332, T331, T333, T312, T313, less20_in_gg(T332, T331))
U23_gag(T332, T331, T333, T312, T313, less20_out_gg(T332, T331)) → insert1_out_gag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_gag(T336, T331, T337, T340, T313, less20_in_gg(T336, T331))
U24_gag(T336, T331, T337, T340, T313, less20_out_gg(T336, T331)) → U25_gag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
insert1_in_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_gag(T361, T357, T358, T362, T360, less33_in_gg(T357, T361))
U26_gag(T361, T357, T358, T362, T360, less33_out_gg(T357, T361)) → insert1_out_gag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_gag(T365, T357, T369, T366, T360, less33_in_gg(T357, T365))
U27_gag(T365, T357, T369, T366, T360, less33_out_gg(T357, T365)) → U28_gag(T365, T357, T369, T366, T360, insert1_in_gag(T365, T366, T360))
insert1_in_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_gag(T393, T382, T392, T384, insert1_in_gag(s(T393), T392, T384))
insert1_in_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_gag(T402, T400, T382, T403, T384, less33_in_gg(T400, T402))
U30_gag(T402, T400, T382, T403, T384, less33_out_gg(T400, T402)) → insert1_out_gag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_gag(T406, T400, T410, T407, T384, less33_in_gg(T400, T406))
U31_gag(T406, T400, T410, T407, T384, less33_out_gg(T400, T406)) → U32_gag(T406, T400, T410, T407, T384, insert1_in_gag(s(T406), T407, T384))
insert1_in_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_gag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
insert1_in_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_gag(T444, T443, T445, T424, T425, less20_in_gg(T444, T443))
U34_gag(T444, T443, T445, T424, T425, less20_out_gg(T444, T443)) → insert1_out_gag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_gag(T448, T443, T449, T452, T425, less20_in_gg(T448, T443))
U35_gag(T448, T443, T449, T452, T425, less20_out_gg(T448, T443)) → U36_gag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
insert1_in_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_gag(T473, T469, T470, T474, T472, less33_in_gg(T469, T473))
U37_gag(T473, T469, T470, T474, T472, less33_out_gg(T469, T473)) → insert1_out_gag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_gag(T477, T469, T481, T478, T472, less33_in_gg(T469, T477))
U38_gag(T477, T469, T481, T478, T472, less33_out_gg(T469, T477)) → U39_gag(T477, T469, T481, T478, T472, insert1_in_gag(T477, T478, T472))
insert1_in_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_gag(T508, T497, T507, T499, insert1_in_gag(s(T508), T507, T499))
insert1_in_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_gag(T517, T515, T497, T518, T499, less33_in_gg(T515, T517))
U41_gag(T517, T515, T497, T518, T499, less33_out_gg(T515, T517)) → insert1_out_gag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_gag(T521, T515, T525, T522, T499, less33_in_gg(T515, T521))
U42_gag(T521, T515, T525, T522, T499, less33_out_gg(T515, T521)) → U43_gag(T521, T515, T525, T522, T499, insert1_in_gag(s(T521), T522, T499))
U43_gag(T521, T515, T525, T522, T499, insert1_out_gag(s(T521), T522, T499)) → insert1_out_gag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_gag(T508, T497, T507, T499, insert1_out_gag(s(T508), T507, T499)) → insert1_out_gag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_gag(T477, T469, T481, T478, T472, insert1_out_gag(T477, T478, T472)) → insert1_out_gag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U36_gag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_gag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
U33_gag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_gag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
U32_gag(T406, T400, T410, T407, T384, insert1_out_gag(s(T406), T407, T384)) → insert1_out_gag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_gag(T393, T382, T392, T384, insert1_out_gag(s(T393), T392, T384)) → insert1_out_gag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_gag(T365, T357, T369, T366, T360, insert1_out_gag(T365, T366, T360)) → insert1_out_gag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U25_gag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_gag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
U22_gag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_gag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
U20_gag(T271, T270, insert1_out_gag(s(T271), T270, void)) → insert1_out_gag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gga(T173, T179, T180, insert1_out_gag(s(T179), T180, void)) → p50_out_gga(T173, T179, T180)
U7_gga(T173, T175, T176, p50_out_gga(T173, T175, T176)) → p43_out_gga(s(T173), s(T175), T176)
U19_gag(T251, T248, T252, p43_out_gga(T248, T251, T252)) → insert1_out_gag(T251, tree(T248, void, T252), tree(T248, void, void))
U17_gag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_gag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
U6_gga(T152, T151, insert1_out_gag(s(T152), T151, void)) → p43_out_gga(0, s(T152), T151)
U16_gag(T144, T141, T145, p43_out_gga(T141, T144, T145)) → insert1_out_gag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_gag(T102, T95, T103, insert1_out_gag(T102, T103, void)) → insert1_out_gag(T102, tree(T95, void, T103), tree(T95, void, void))
U5_gga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_gga(T52, T47, T53)
U12_gag(T48, T47, T49, p18_out_gga(T48, T47, T49)) → insert1_out_gag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
U11_gag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_gag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
U11_aag(T26, T27, insert1_out_gag(0, T27, void)) → insert1_out_aag(0, tree(s(T26), T27, void), tree(s(T26), void, void))
insert1_in_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void)) → U12_aag(T48, T47, T49, p18_in_aga(T48, T47, T49))
p18_in_aga(T48, T47, T49) → U3_aga(T48, T47, T49, less20_in_ag(T48, T47))
less20_in_ag(0, s(T60)) → less20_out_ag(0, s(T60))
less20_in_ag(s(T67), s(T66)) → U1_ag(T67, T66, less20_in_ag(T67, T66))
U1_ag(T67, T66, less20_out_ag(T67, T66)) → less20_out_ag(s(T67), s(T66))
U3_aga(T48, T47, T49, less20_out_ag(T48, T47)) → p18_out_aga(T48, T47, T49)
p18_in_aga(T52, T47, T53) → U4_aga(T52, T47, T53, less20_in_ag(T52, T47))
U4_aga(T52, T47, T53, less20_out_ag(T52, T47)) → U5_aga(T52, T47, T53, insert1_in_gag(s(T52), T53, void))
U5_aga(T52, T47, T53, insert1_out_gag(s(T52), T53, void)) → p18_out_aga(T52, T47, T53)
U12_aag(T48, T47, T49, p18_out_aga(T48, T47, T49)) → insert1_out_aag(s(T48), tree(s(T47), T49, void), tree(s(T47), void, void))
insert1_in_aag(T98, tree(T95, void, T99), tree(T95, void, void)) → U13_aag(T98, T95, T99, less33_in_ga(T95, T98))
less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))
U13_aag(T98, T95, T99, less33_out_ga(T95, T98)) → insert1_out_aag(T98, tree(T95, void, T99), tree(T95, void, void))
insert1_in_aag(T102, tree(T95, void, T103), tree(T95, void, void)) → U14_aag(T102, T95, T103, less33_in_ga(T95, T102))
U14_aag(T102, T95, T103, less33_out_ga(T95, T102)) → U15_aag(T102, T95, T103, insert1_in_aag(T102, T103, void))
insert1_in_aag(T144, tree(T141, void, T145), tree(T141, void, void)) → U16_aag(T144, T141, T145, p43_in_gaa(T141, T144, T145))
p43_in_gaa(0, s(T152), T151) → U6_gaa(T152, T151, insert1_in_aag(s(T152), T151, void))
insert1_in_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void)) → U17_aag(T213, T214, insert1_in_gag(0, T214, void))
U17_aag(T213, T214, insert1_out_gag(0, T214, void)) → insert1_out_aag(0, tree(s(T213), T214, void), tree(s(T213), void, void))
insert1_in_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void)) → U18_aag(T235, T234, T236, p18_in_aga(T235, T234, T236))
U18_aag(T235, T234, T236, p18_out_aga(T235, T234, T236)) → insert1_out_aag(s(T235), tree(s(T234), T236, void), tree(s(T234), void, void))
insert1_in_aag(T251, tree(T248, void, T252), tree(T248, void, void)) → U19_aag(T251, T248, T252, p43_in_gaa(T248, T251, T252))
p43_in_gaa(s(T173), s(T175), T176) → U7_gaa(T173, T175, T176, p50_in_gaa(T173, T175, T176))
p50_in_gaa(T173, T175, T176) → U8_gaa(T173, T175, T176, less33_in_ga(T173, T175))
U8_gaa(T173, T175, T176, less33_out_ga(T173, T175)) → p50_out_gaa(T173, T175, T176)
p50_in_gaa(T173, T179, T180) → U9_gaa(T173, T179, T180, less33_in_ga(T173, T179))
U9_gaa(T173, T179, T180, less33_out_ga(T173, T179)) → U10_gaa(T173, T179, T180, insert1_in_aag(s(T179), T180, void))
insert1_in_aag(s(T271), tree(0, void, T270), tree(0, void, void)) → U20_aag(T271, T270, insert1_in_aag(s(T271), T270, void))
insert1_in_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void)) → U21_aag(T294, T292, T295, p50_in_gaa(T292, T294, T295))
U21_aag(T294, T292, T295, p50_out_gaa(T292, T294, T295)) → insert1_out_aag(s(T294), tree(s(T292), void, T295), tree(s(T292), void, void))
insert1_in_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303)) → insert1_out_aag(T301, tree(T301, T302, T303), tree(T301, T302, T303))
insert1_in_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312)) → U22_aag(T320, T321, T312, T313, insert1_in_gag(0, T321, T313))
U22_aag(T320, T321, T312, T313, insert1_out_gag(0, T321, T313)) → insert1_out_aag(0, tree(s(T320), T321, T312), tree(s(T320), T313, T312))
insert1_in_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312)) → U23_aag(T332, T331, T333, T312, T313, less20_in_ag(T332, T331))
U23_aag(T332, T331, T333, T312, T313, less20_out_ag(T332, T331)) → insert1_out_aag(s(T332), tree(s(T331), T333, T312), tree(s(T331), T313, T312))
insert1_in_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340)) → U24_aag(T336, T331, T337, T340, T313, less20_in_ag(T336, T331))
U24_aag(T336, T331, T337, T340, T313, less20_out_ag(T336, T331)) → U25_aag(T336, T331, T337, T340, T313, insert1_in_gag(s(T336), T337, T313))
U25_aag(T336, T331, T337, T340, T313, insert1_out_gag(s(T336), T337, T313)) → insert1_out_aag(s(T336), tree(s(T331), T337, T340), tree(s(T331), T313, T340))
insert1_in_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360)) → U26_aag(T361, T357, T358, T362, T360, less33_in_ga(T357, T361))
U26_aag(T361, T357, T358, T362, T360, less33_out_ga(T357, T361)) → insert1_out_aag(T361, tree(T357, T358, T362), tree(T357, T358, T360))
insert1_in_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_aag(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_aag(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → U28_aag(T365, T357, T369, T366, T360, insert1_in_aag(T365, T366, T360))
insert1_in_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → U29_aag(T393, T382, T392, T384, insert1_in_aag(s(T393), T392, T384))
insert1_in_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384)) → U30_aag(T402, T400, T382, T403, T384, less33_in_ga(T400, T402))
U30_aag(T402, T400, T382, T403, T384, less33_out_ga(T400, T402)) → insert1_out_aag(s(T402), tree(s(T400), T382, T403), tree(s(T400), T382, T384))
insert1_in_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_aag(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_aag(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → U32_aag(T406, T400, T410, T407, T384, insert1_in_aag(s(T406), T407, T384))
insert1_in_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424)) → U33_aag(T432, T433, T424, T425, insert1_in_gag(0, T433, T425))
U33_aag(T432, T433, T424, T425, insert1_out_gag(0, T433, T425)) → insert1_out_aag(0, tree(s(T432), T433, T424), tree(s(T432), T425, T424))
insert1_in_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424)) → U34_aag(T444, T443, T445, T424, T425, less20_in_ag(T444, T443))
U34_aag(T444, T443, T445, T424, T425, less20_out_ag(T444, T443)) → insert1_out_aag(s(T444), tree(s(T443), T445, T424), tree(s(T443), T425, T424))
insert1_in_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452)) → U35_aag(T448, T443, T449, T452, T425, less20_in_ag(T448, T443))
U35_aag(T448, T443, T449, T452, T425, less20_out_ag(T448, T443)) → U36_aag(T448, T443, T449, T452, T425, insert1_in_gag(s(T448), T449, T425))
U36_aag(T448, T443, T449, T452, T425, insert1_out_gag(s(T448), T449, T425)) → insert1_out_aag(s(T448), tree(s(T443), T449, T452), tree(s(T443), T425, T452))
insert1_in_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472)) → U37_aag(T473, T469, T470, T474, T472, less33_in_ga(T469, T473))
U37_aag(T473, T469, T470, T474, T472, less33_out_ga(T469, T473)) → insert1_out_aag(T473, tree(T469, T470, T474), tree(T469, T470, T472))
insert1_in_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_aag(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_aag(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → U39_aag(T477, T469, T481, T478, T472, insert1_in_aag(T477, T478, T472))
insert1_in_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499)) → U40_aag(T508, T497, T507, T499, insert1_in_aag(s(T508), T507, T499))
insert1_in_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499)) → U41_aag(T517, T515, T497, T518, T499, less33_in_ga(T515, T517))
U41_aag(T517, T515, T497, T518, T499, less33_out_ga(T515, T517)) → insert1_out_aag(s(T517), tree(s(T515), T497, T518), tree(s(T515), T497, T499))
insert1_in_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_aag(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_aag(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → U43_aag(T521, T515, T525, T522, T499, insert1_in_aag(s(T521), T522, T499))
U43_aag(T521, T515, T525, T522, T499, insert1_out_aag(s(T521), T522, T499)) → insert1_out_aag(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499))
U40_aag(T508, T497, T507, T499, insert1_out_aag(s(T508), T507, T499)) → insert1_out_aag(s(T508), tree(0, T497, T507), tree(0, T497, T499))
U39_aag(T477, T469, T481, T478, T472, insert1_out_aag(T477, T478, T472)) → insert1_out_aag(T477, tree(T469, T481, T478), tree(T469, T481, T472))
U32_aag(T406, T400, T410, T407, T384, insert1_out_aag(s(T406), T407, T384)) → insert1_out_aag(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384))
U29_aag(T393, T382, T392, T384, insert1_out_aag(s(T393), T392, T384)) → insert1_out_aag(s(T393), tree(0, T382, T392), tree(0, T382, T384))
U28_aag(T365, T357, T369, T366, T360, insert1_out_aag(T365, T366, T360)) → insert1_out_aag(T365, tree(T357, T369, T366), tree(T357, T369, T360))
U20_aag(T271, T270, insert1_out_aag(s(T271), T270, void)) → insert1_out_aag(s(T271), tree(0, void, T270), tree(0, void, void))
U10_gaa(T173, T179, T180, insert1_out_aag(s(T179), T180, void)) → p50_out_gaa(T173, T179, T180)
U7_gaa(T173, T175, T176, p50_out_gaa(T173, T175, T176)) → p43_out_gaa(s(T173), s(T175), T176)
U19_aag(T251, T248, T252, p43_out_gaa(T248, T251, T252)) → insert1_out_aag(T251, tree(T248, void, T252), tree(T248, void, void))
U6_gaa(T152, T151, insert1_out_aag(s(T152), T151, void)) → p43_out_gaa(0, s(T152), T151)
U16_aag(T144, T141, T145, p43_out_gaa(T141, T144, T145)) → insert1_out_aag(T144, tree(T141, void, T145), tree(T141, void, void))
U15_aag(T102, T95, T103, insert1_out_aag(T102, T103, void)) → insert1_out_aag(T102, tree(T95, void, T103), tree(T95, void, void))

The argument filtering Pi contains the following mapping:
insert1_in_aag(x1, x2, x3)  =  insert1_in_aag(x3)
tree(x1, x2, x3)  =  tree(x1, x2, x3)
void  =  void
insert1_out_aag(x1, x2, x3)  =  insert1_out_aag
s(x1)  =  s(x1)
U11_aag(x1, x2, x3)  =  U11_aag(x3)
insert1_in_gag(x1, x2, x3)  =  insert1_in_gag(x1, x3)
insert1_out_gag(x1, x2, x3)  =  insert1_out_gag
0  =  0
U11_gag(x1, x2, x3)  =  U11_gag(x3)
U12_gag(x1, x2, x3, x4)  =  U12_gag(x4)
p18_in_gga(x1, x2, x3)  =  p18_in_gga(x1, x2)
U3_gga(x1, x2, x3, x4)  =  U3_gga(x4)
less20_in_gg(x1, x2)  =  less20_in_gg(x1, x2)
less20_out_gg(x1, x2)  =  less20_out_gg
U1_gg(x1, x2, x3)  =  U1_gg(x3)
p18_out_gga(x1, x2, x3)  =  p18_out_gga
U4_gga(x1, x2, x3, x4)  =  U4_gga(x1, x4)
U5_gga(x1, x2, x3, x4)  =  U5_gga(x4)
U13_gag(x1, x2, x3, x4)  =  U13_gag(x4)
less33_in_gg(x1, x2)  =  less33_in_gg(x1, x2)
less33_out_gg(x1, x2)  =  less33_out_gg
U2_gg(x1, x2, x3)  =  U2_gg(x3)
U14_gag(x1, x2, x3, x4)  =  U14_gag(x1, x4)
U15_gag(x1, x2, x3, x4)  =  U15_gag(x4)
U16_gag(x1, x2, x3, x4)  =  U16_gag(x4)
p43_in_gga(x1, x2, x3)  =  p43_in_gga(x1, x2)
U6_gga(x1, x2, x3)  =  U6_gga(x3)
U17_gag(x1, x2, x3)  =  U17_gag(x3)
U18_gag(x1, x2, x3, x4)  =  U18_gag(x4)
U19_gag(x1, x2, x3, x4)  =  U19_gag(x4)
U7_gga(x1, x2, x3, x4)  =  U7_gga(x4)
p50_in_gga(x1, x2, x3)  =  p50_in_gga(x1, x2)
U8_gga(x1, x2, x3, x4)  =  U8_gga(x4)
p50_out_gga(x1, x2, x3)  =  p50_out_gga
U9_gga(x1, x2, x3, x4)  =  U9_gga(x2, x4)
U10_gga(x1, x2, x3, x4)  =  U10_gga(x4)
U20_gag(x1, x2, x3)  =  U20_gag(x3)
U21_gag(x1, x2, x3, x4)  =  U21_gag(x4)
U22_gag(x1, x2, x3, x4, x5)  =  U22_gag(x5)
U23_gag(x1, x2, x3, x4, x5, x6)  =  U23_gag(x6)
U24_gag(x1, x2, x3, x4, x5, x6)  =  U24_gag(x1, x5, x6)
U25_gag(x1, x2, x3, x4, x5, x6)  =  U25_gag(x6)
U26_gag(x1, x2, x3, x4, x5, x6)  =  U26_gag(x6)
U27_gag(x1, x2, x3, x4, x5, x6)  =  U27_gag(x1, x5, x6)
U28_gag(x1, x2, x3, x4, x5, x6)  =  U28_gag(x6)
U29_gag(x1, x2, x3, x4, x5)  =  U29_gag(x5)
U30_gag(x1, x2, x3, x4, x5, x6)  =  U30_gag(x6)
U31_gag(x1, x2, x3, x4, x5, x6)  =  U31_gag(x1, x5, x6)
U32_gag(x1, x2, x3, x4, x5, x6)  =  U32_gag(x6)
U33_gag(x1, x2, x3, x4, x5)  =  U33_gag(x5)
U34_gag(x1, x2, x3, x4, x5, x6)  =  U34_gag(x6)
U35_gag(x1, x2, x3, x4, x5, x6)  =  U35_gag(x1, x5, x6)
U36_gag(x1, x2, x3, x4, x5, x6)  =  U36_gag(x6)
U37_gag(x1, x2, x3, x4, x5, x6)  =  U37_gag(x6)
U38_gag(x1, x2, x3, x4, x5, x6)  =  U38_gag(x1, x5, x6)
U39_gag(x1, x2, x3, x4, x5, x6)  =  U39_gag(x6)
U40_gag(x1, x2, x3, x4, x5)  =  U40_gag(x5)
U41_gag(x1, x2, x3, x4, x5, x6)  =  U41_gag(x6)
U42_gag(x1, x2, x3, x4, x5, x6)  =  U42_gag(x1, x5, x6)
U43_gag(x1, x2, x3, x4, x5, x6)  =  U43_gag(x6)
p43_out_gga(x1, x2, x3)  =  p43_out_gga
U12_aag(x1, x2, x3, x4)  =  U12_aag(x4)
p18_in_aga(x1, x2, x3)  =  p18_in_aga(x2)
U3_aga(x1, x2, x3, x4)  =  U3_aga(x4)
less20_in_ag(x1, x2)  =  less20_in_ag(x2)
less20_out_ag(x1, x2)  =  less20_out_ag(x1)
U1_ag(x1, x2, x3)  =  U1_ag(x3)
p18_out_aga(x1, x2, x3)  =  p18_out_aga(x1)
U4_aga(x1, x2, x3, x4)  =  U4_aga(x4)
U5_aga(x1, x2, x3, x4)  =  U5_aga(x1, x4)
U13_aag(x1, x2, x3, x4)  =  U13_aag(x4)
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
U14_aag(x1, x2, x3, x4)  =  U14_aag(x4)
U15_aag(x1, x2, x3, x4)  =  U15_aag(x4)
U16_aag(x1, x2, x3, x4)  =  U16_aag(x4)
p43_in_gaa(x1, x2, x3)  =  p43_in_gaa(x1)
U6_gaa(x1, x2, x3)  =  U6_gaa(x3)
U17_aag(x1, x2, x3)  =  U17_aag(x3)
U18_aag(x1, x2, x3, x4)  =  U18_aag(x4)
U19_aag(x1, x2, x3, x4)  =  U19_aag(x4)
U7_gaa(x1, x2, x3, x4)  =  U7_gaa(x4)
p50_in_gaa(x1, x2, x3)  =  p50_in_gaa(x1)
U8_gaa(x1, x2, x3, x4)  =  U8_gaa(x4)
p50_out_gaa(x1, x2, x3)  =  p50_out_gaa
U9_gaa(x1, x2, x3, x4)  =  U9_gaa(x4)
U10_gaa(x1, x2, x3, x4)  =  U10_gaa(x4)
U20_aag(x1, x2, x3)  =  U20_aag(x3)
U21_aag(x1, x2, x3, x4)  =  U21_aag(x4)
U22_aag(x1, x2, x3, x4, x5)  =  U22_aag(x5)
U23_aag(x1, x2, x3, x4, x5, x6)  =  U23_aag(x6)
U24_aag(x1, x2, x3, x4, x5, x6)  =  U24_aag(x5, x6)
U25_aag(x1, x2, x3, x4, x5, x6)  =  U25_aag(x6)
U26_aag(x1, x2, x3, x4, x5, x6)  =  U26_aag(x6)
U27_aag(x1, x2, x3, x4, x5, x6)  =  U27_aag(x5, x6)
U28_aag(x1, x2, x3, x4, x5, x6)  =  U28_aag(x6)
U29_aag(x1, x2, x3, x4, x5)  =  U29_aag(x5)
U30_aag(x1, x2, x3, x4, x5, x6)  =  U30_aag(x6)
U31_aag(x1, x2, x3, x4, x5, x6)  =  U31_aag(x5, x6)
U32_aag(x1, x2, x3, x4, x5, x6)  =  U32_aag(x6)
U33_aag(x1, x2, x3, x4, x5)  =  U33_aag(x5)
U34_aag(x1, x2, x3, x4, x5, x6)  =  U34_aag(x6)
U35_aag(x1, x2, x3, x4, x5, x6)  =  U35_aag(x5, x6)
U36_aag(x1, x2, x3, x4, x5, x6)  =  U36_aag(x6)
U37_aag(x1, x2, x3, x4, x5, x6)  =  U37_aag(x6)
U38_aag(x1, x2, x3, x4, x5, x6)  =  U38_aag(x5, x6)
U39_aag(x1, x2, x3, x4, x5, x6)  =  U39_aag(x6)
U40_aag(x1, x2, x3, x4, x5)  =  U40_aag(x5)
U41_aag(x1, x2, x3, x4, x5, x6)  =  U41_aag(x6)
U42_aag(x1, x2, x3, x4, x5, x6)  =  U42_aag(x5, x6)
U43_aag(x1, x2, x3, x4, x5, x6)  =  U43_aag(x6)
p43_out_gaa(x1, x2, x3)  =  p43_out_gaa
INSERT1_IN_AAG(x1, x2, x3)  =  INSERT1_IN_AAG(x3)
U27_AAG(x1, x2, x3, x4, x5, x6)  =  U27_AAG(x5, x6)
U31_AAG(x1, x2, x3, x4, x5, x6)  =  U31_AAG(x5, x6)
U38_AAG(x1, x2, x3, x4, x5, x6)  =  U38_AAG(x5, x6)
U42_AAG(x1, x2, x3, x4, x5, x6)  =  U42_AAG(x5, x6)

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

(45) UsableRulesProof (EQUIVALENT transformation)

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

(46) Obligation:

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

INSERT1_IN_AAG(T365, tree(T357, T369, T366), tree(T357, T369, T360)) → U27_AAG(T365, T357, T369, T366, T360, less33_in_ga(T357, T365))
U27_AAG(T365, T357, T369, T366, T360, less33_out_ga(T357, T365)) → INSERT1_IN_AAG(T365, T366, T360)
INSERT1_IN_AAG(s(T393), tree(0, T382, T392), tree(0, T382, T384)) → INSERT1_IN_AAG(s(T393), T392, T384)
INSERT1_IN_AAG(s(T406), tree(s(T400), T410, T407), tree(s(T400), T410, T384)) → U31_AAG(T406, T400, T410, T407, T384, less33_in_ga(T400, T406))
U31_AAG(T406, T400, T410, T407, T384, less33_out_ga(T400, T406)) → INSERT1_IN_AAG(s(T406), T407, T384)
INSERT1_IN_AAG(T477, tree(T469, T481, T478), tree(T469, T481, T472)) → U38_AAG(T477, T469, T481, T478, T472, less33_in_ga(T469, T477))
U38_AAG(T477, T469, T481, T478, T472, less33_out_ga(T469, T477)) → INSERT1_IN_AAG(T477, T478, T472)
INSERT1_IN_AAG(s(T521), tree(s(T515), T525, T522), tree(s(T515), T525, T499)) → U42_AAG(T521, T515, T525, T522, T499, less33_in_ga(T515, T521))
U42_AAG(T521, T515, T525, T522, T499, less33_out_ga(T515, T521)) → INSERT1_IN_AAG(s(T521), T522, T499)

The TRS R consists of the following rules:

less33_in_ga(0, s(T110)) → less33_out_ga(0, s(T110))
less33_in_ga(s(T115), s(T117)) → U2_ga(T115, T117, less33_in_ga(T115, T117))
U2_ga(T115, T117, less33_out_ga(T115, T117)) → less33_out_ga(s(T115), s(T117))

The argument filtering Pi contains the following mapping:
tree(x1, x2, x3)  =  tree(x1, x2, x3)
s(x1)  =  s(x1)
0  =  0
less33_in_ga(x1, x2)  =  less33_in_ga(x1)
less33_out_ga(x1, x2)  =  less33_out_ga
U2_ga(x1, x2, x3)  =  U2_ga(x3)
INSERT1_IN_AAG(x1, x2, x3)  =  INSERT1_IN_AAG(x3)
U27_AAG(x1, x2, x3, x4, x5, x6)  =  U27_AAG(x5, x6)
U31_AAG(x1, x2, x3, x4, x5, x6)  =  U31_AAG(x5, x6)
U38_AAG(x1, x2, x3, x4, x5, x6)  =  U38_AAG(x5, x6)
U42_AAG(x1, x2, x3, x4, x5, x6)  =  U42_AAG(x5, x6)

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

(47) PiDPToQDPProof (SOUND transformation)

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

(48) Obligation:

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

INSERT1_IN_AAG(tree(T357, T369, T360)) → U27_AAG(T360, less33_in_ga(T357))
U27_AAG(T360, less33_out_ga) → INSERT1_IN_AAG(T360)
INSERT1_IN_AAG(tree(0, T382, T384)) → INSERT1_IN_AAG(T384)
INSERT1_IN_AAG(tree(s(T400), T410, T384)) → U31_AAG(T384, less33_in_ga(T400))
U31_AAG(T384, less33_out_ga) → INSERT1_IN_AAG(T384)
INSERT1_IN_AAG(tree(T469, T481, T472)) → U38_AAG(T472, less33_in_ga(T469))
U38_AAG(T472, less33_out_ga) → INSERT1_IN_AAG(T472)
INSERT1_IN_AAG(tree(s(T515), T525, T499)) → U42_AAG(T499, less33_in_ga(T515))
U42_AAG(T499, less33_out_ga) → INSERT1_IN_AAG(T499)

The TRS R consists of the following rules:

less33_in_ga(0) → less33_out_ga
less33_in_ga(s(T115)) → U2_ga(less33_in_ga(T115))
U2_ga(less33_out_ga) → less33_out_ga

The set Q consists of the following terms:

less33_in_ga(x0)
U2_ga(x0)

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

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

  • U27_AAG(T360, less33_out_ga) → INSERT1_IN_AAG(T360)
    The graph contains the following edges 1 >= 1

  • INSERT1_IN_AAG(tree(0, T382, T384)) → INSERT1_IN_AAG(T384)
    The graph contains the following edges 1 > 1

  • INSERT1_IN_AAG(tree(T357, T369, T360)) → U27_AAG(T360, less33_in_ga(T357))
    The graph contains the following edges 1 > 1

  • U31_AAG(T384, less33_out_ga) → INSERT1_IN_AAG(T384)
    The graph contains the following edges 1 >= 1

  • INSERT1_IN_AAG(tree(s(T400), T410, T384)) → U31_AAG(T384, less33_in_ga(T400))
    The graph contains the following edges 1 > 1

  • U38_AAG(T472, less33_out_ga) → INSERT1_IN_AAG(T472)
    The graph contains the following edges 1 >= 1

  • U42_AAG(T499, less33_out_ga) → INSERT1_IN_AAG(T499)
    The graph contains the following edges 1 >= 1

  • INSERT1_IN_AAG(tree(T469, T481, T472)) → U38_AAG(T472, less33_in_ga(T469))
    The graph contains the following edges 1 > 1

  • INSERT1_IN_AAG(tree(s(T515), T525, T499)) → U42_AAG(T499, less33_in_ga(T515))
    The graph contains the following edges 1 > 1

(50) YES