0 Prolog
↳1 PrologToPrologProblemTransformerProof (⇐)
↳2 Prolog
↳3 PrologToPiTRSProof (⇐)
↳4 PiTRS
↳5 DependencyPairsProof (⇔)
↳6 PiDP
↳7 DependencyGraphProof (⇔)
↳8 AND
↳9 PiDP
↳10 UsableRulesProof (⇔)
↳11 PiDP
↳12 PiDPToQDPProof (⇐)
↳13 QDP
↳14 QDPSizeChangeProof (⇔)
↳15 YES
↳16 PiDP
↳17 UsableRulesProof (⇔)
↳18 PiDP
↳19 PiDPToQDPProof (⇐)
↳20 QDP
↳21 QDPSizeChangeProof (⇔)
↳22 YES
balance1_in_ga(nil, nil) → balance1_out_ga(nil, nil)
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
balance5512_in_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110) → balance5512_out_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
U10_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_ga(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
balance5513_in_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], []) → balance5513_out_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], [])
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_out_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
U12_ga(T20, T21, T22, T28, T29, T31, balance5513_out_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
balance1_in_ga(nil, nil) → balance1_out_ga(nil, nil)
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
balance5512_in_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110) → balance5512_out_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
U10_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_ga(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
balance5513_in_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], []) → balance5513_out_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], [])
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_out_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
U12_ga(T20, T21, T22, T28, T29, T31, balance5513_out_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
BALANCE1_IN_GA(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_GA(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
BALANCE1_IN_GA(tree(T20, T21, T22), tree(T28, T29, T31)) → BALANCE5512_IN_GAAAAAAAAAAAAGA(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)
BALANCE5512_IN_GAAAAAAAAAAAAGA(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_GAAAAAAAAAAAAGA(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
BALANCE5512_IN_GAAAAAAAAAAAAGA(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → BALANCE5523_IN_GAAAAAAAAAGA(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → BALANCE5523_IN_GAAAAAAAAAGA(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → BALANCE5523_IN_GAAAAAAAAAGA(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)
BALANCE5512_IN_GAAAAAAAAAAAAGA(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U8_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → BALANCE5523_IN_GAAAAAAAAAGA(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)
BALANCE1_IN_GA(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_GA(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_GA(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_GA(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
U11_GA(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → BALANCE5513_IN_GAAAAAAA(T22, T50, T51, T48, T49, T52, T53, T54)
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_GAAAAAAA(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → BALANCE5523_IN_GAAAAAAAAAGA(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → BALANCE5513_IN_GAAAAAAA(T454, T493, T494, T498, T499, T495, T496, T497)
balance1_in_ga(nil, nil) → balance1_out_ga(nil, nil)
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
balance5512_in_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110) → balance5512_out_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
U10_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_ga(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
balance5513_in_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], []) → balance5513_out_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], [])
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_out_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
U12_ga(T20, T21, T22, T28, T29, T31, balance5513_out_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
BALANCE1_IN_GA(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_GA(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
BALANCE1_IN_GA(tree(T20, T21, T22), tree(T28, T29, T31)) → BALANCE5512_IN_GAAAAAAAAAAAAGA(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)
BALANCE5512_IN_GAAAAAAAAAAAAGA(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_GAAAAAAAAAAAAGA(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
BALANCE5512_IN_GAAAAAAAAAAAAGA(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → BALANCE5523_IN_GAAAAAAAAAGA(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → BALANCE5523_IN_GAAAAAAAAAGA(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → BALANCE5523_IN_GAAAAAAAAAGA(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)
BALANCE5512_IN_GAAAAAAAAAAAAGA(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U8_GAAAAAAAAAAAAGA(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → BALANCE5523_IN_GAAAAAAAAAGA(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)
BALANCE1_IN_GA(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_GA(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_GA(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_GA(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
U11_GA(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → BALANCE5513_IN_GAAAAAAA(T22, T50, T51, T48, T49, T52, T53, T54)
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_GAAAAAAA(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → BALANCE5523_IN_GAAAAAAAAAGA(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → BALANCE5513_IN_GAAAAAAA(T454, T493, T494, T498, T499, T495, T496, T497)
balance1_in_ga(nil, nil) → balance1_out_ga(nil, nil)
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
balance5512_in_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110) → balance5512_out_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
U10_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_ga(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
balance5513_in_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], []) → balance5513_out_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], [])
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_out_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
U12_ga(T20, T21, T22, T28, T29, T31, balance5513_out_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → BALANCE5523_IN_GAAAAAAAAAGA(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → BALANCE5523_IN_GAAAAAAAAAGA(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)
balance1_in_ga(nil, nil) → balance1_out_ga(nil, nil)
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
balance5512_in_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110) → balance5512_out_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
U10_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_ga(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
balance5513_in_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], []) → balance5513_out_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], [])
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_out_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
U12_ga(T20, T21, T22, T28, T29, T31, balance5513_out_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_GAAAAAAAAAGA(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → BALANCE5523_IN_GAAAAAAAAAGA(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → BALANCE5523_IN_GAAAAAAAAAGA(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T320) → U2_GAAAAAAAAAGA(T308, T320, balance5523_in_gaaaaaaaaaga(T306, T307))
U2_GAAAAAAAAAGA(T308, T320, balance5523_out_gaaaaaaaaaga) → BALANCE5523_IN_GAAAAAAAAAGA(T308, T320)
BALANCE5523_IN_GAAAAAAAAAGA(tree(T306, T307, T308), T320) → BALANCE5523_IN_GAAAAAAAAAGA(T306, T307)
balance5523_in_gaaaaaaaaaga(nil, T274) → balance5523_out_gaaaaaaaaaga
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T320) → U1_gaaaaaaaaaga(balance5523_in_gaaaaaaaaaga(T306, T307))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T320) → U2_gaaaaaaaaaga(T308, T320, balance5523_in_gaaaaaaaaaga(T306, T307))
U1_gaaaaaaaaaga(balance5523_out_gaaaaaaaaaga) → balance5523_out_gaaaaaaaaaga
U2_gaaaaaaaaaga(T308, T320, balance5523_out_gaaaaaaaaaga) → U3_gaaaaaaaaaga(balance5523_in_gaaaaaaaaaga(T308, T320))
U3_gaaaaaaaaaga(balance5523_out_gaaaaaaaaaga) → balance5523_out_gaaaaaaaaaga
balance5523_in_gaaaaaaaaaga(x0, x1)
U1_gaaaaaaaaaga(x0)
U2_gaaaaaaaaaga(x0, x1, x2)
U3_gaaaaaaaaaga(x0)
From the DPs we obtained the following set of size-change graphs:
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → BALANCE5513_IN_GAAAAAAA(T454, T493, T494, T498, T499, T495, T496, T497)
balance1_in_ga(nil, nil) → balance1_out_ga(nil, nil)
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U10_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124))
balance5512_in_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110) → balance5512_out_gaaaaaaaaaaaaga(nil, X242, .(','(nil, -(X244, X244)), X245), X244, X245, .(','(T103, -(.(T109, T110), .(T105, T106))), .(','(T107, -(T106, [])), T108)), T108, T103, .(T109, T110), T105, T106, T107, T108, T109, T110)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330))
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U7_gaaaaaaaaaaaaga(T139, T140, T141, X331, X332, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, X331, X332, X326, X327, X328, X329, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, X330)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), X331, X332, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
balance5512_in_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337) → U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190))
U8_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T139, T184, T185, T186, T187, T188, T189, .(','(T155, -(T156, [])), .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153))), T153, T154, T140, T190)) → U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_in_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337))
U9_gaaaaaaaaaaaaga(T139, T140, T141, T184, T185, X333, X334, X335, X336, T157, T158, T160, T154, T161, T156, T155, T159, T153, T152, X337, balance5523_out_gaaaaaaaaaga(T141, T186, T187, X333, X334, X335, X336, T188, T189, T190, T152, X337)) → balance5512_out_gaaaaaaaaaaaaga(tree(T139, T140, T141), T184, T185, X333, X334, X335, X336, tree(T157, T158, T160), T154, T161, T156, T155, .(','(T157, -(T154, .(T158, T159))), .(','(T160, -(T159, .(T161, T156))), T153)), T152, X337)
U10_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, X125, X126, X120, X121, X122, X123, T28, T27, T29, T30, T31, T26, T21, X124)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
balance1_in_ga(tree(T20, T21, T22), tree(T28, T29, T31)) → U11_ga(T20, T21, T22, T28, T29, T31, balance5512_in_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54))
U11_ga(T20, T21, T22, T28, T29, T31, balance5512_out_gaaaaaaaaaaaaga(T20, T48, T49, T50, T51, T52, T53, T28, T27, T29, T30, T31, T26, T21, T54)) → U12_ga(T20, T21, T22, T28, T29, T31, balance5513_in_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54))
balance5513_in_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], []) → balance5513_out_gaaaaaaa(nil, T415, [], T417, T418, .(','(nil, -(T417, T417)), T418), [], [])
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696))
U4_gaaaaaaa(T452, T453, T454, T468, T469, T474, T473, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, X692, X693, X694, X695, T470, T471, T472, T453, X696)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T474, T473, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
balance5513_in_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_in_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497))
U6_gaaaaaaa(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5513_out_gaaaaaaa(T454, T493, T494, T498, T499, T495, T496, T497)) → balance5513_out_gaaaaaaa(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472)
U12_ga(T20, T21, T22, T28, T29, T31, balance5513_out_gaaaaaaa(T22, T50, T51, T48, T49, T52, T53, T54)) → balance1_out_ga(tree(T20, T21, T22), tree(T28, T29, T31))
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454), T468, T469, T498, T499, .(','(tree(T459, T460, T461), -(T462, T463)), T470), .(','(T459, -(T462, .(T460, T465))), .(','(T461, -(T465, T463)), T471)), T472) → U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_in_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497))
U5_GAAAAAAA(T452, T453, T454, T468, T469, T498, T499, T459, T460, T461, T462, T463, T470, T465, T471, T472, balance5523_out_gaaaaaaaaaga(T452, T468, T469, T493, T494, T495, T496, T470, T471, T472, T453, T497)) → BALANCE5513_IN_GAAAAAAA(T454, T493, T494, T498, T499, T495, T496, T497)
balance5523_in_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275) → balance5523_out_gaaaaaaaaaga(nil, T267, .(','(nil, -(T269, T269)), T270), T269, T270, T271, T272, T271, T272, .(T274, T275), T274, T275)
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532) → U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348))
U1_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, X523, X524, X525, X526, T323, T324, T325, T307, X527)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
U2_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T306, T321, T322, T344, T345, T346, T347, T323, T324, T325, T307, T348)) → U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_in_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532))
U3_gaaaaaaaaaga(T306, T307, T308, T321, T322, X528, X529, X530, X531, T311, T312, T313, T314, T315, T323, T317, T324, T325, T320, X532, balance5523_out_gaaaaaaaaaga(T308, T344, T345, X528, X529, X530, X531, T346, T347, T348, T320, X532)) → balance5523_out_gaaaaaaaaaga(tree(T306, T307, T308), T321, T322, X528, X529, X530, X531, .(','(tree(T311, T312, T313), -(T314, T315)), T323), .(','(T311, -(T314, .(T312, T317))), .(','(T313, -(T317, T315)), T324)), T325, T320, X532)
BALANCE5513_IN_GAAAAAAA(tree(T452, T453, T454)) → U5_GAAAAAAA(T454, balance5523_in_gaaaaaaaaaga(T452, T453))
U5_GAAAAAAA(T454, balance5523_out_gaaaaaaaaaga) → BALANCE5513_IN_GAAAAAAA(T454)
balance5523_in_gaaaaaaaaaga(nil, T274) → balance5523_out_gaaaaaaaaaga
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T320) → U1_gaaaaaaaaaga(balance5523_in_gaaaaaaaaaga(T306, T307))
balance5523_in_gaaaaaaaaaga(tree(T306, T307, T308), T320) → U2_gaaaaaaaaaga(T308, T320, balance5523_in_gaaaaaaaaaga(T306, T307))
U1_gaaaaaaaaaga(balance5523_out_gaaaaaaaaaga) → balance5523_out_gaaaaaaaaaga
U2_gaaaaaaaaaga(T308, T320, balance5523_out_gaaaaaaaaaga) → U3_gaaaaaaaaaga(balance5523_in_gaaaaaaaaaga(T308, T320))
U3_gaaaaaaaaaga(balance5523_out_gaaaaaaaaaga) → balance5523_out_gaaaaaaaaaga
balance5523_in_gaaaaaaaaaga(x0, x1)
U1_gaaaaaaaaaga(x0)
U2_gaaaaaaaaaga(x0, x1, x2)
U3_gaaaaaaaaaga(x0)
From the DPs we obtained the following set of size-change graphs: