(0) Obligation:

Clauses:

mergesort([], []).
mergesort(.(X, []), .(X, [])).
mergesort(.(X, .(Y, Xs)), Ys) :- ','(split(.(X, .(Y, Xs)), X1s, X2s), ','(mergesort(X1s, Y1s), ','(mergesort(X2s, Y2s), merge(Y1s, Y2s, Ys)))).
split([], [], []).
split(.(X, Xs), .(X, Ys), Zs) :- split(Xs, Zs, Ys).
merge([], Xs, Xs).
merge(Xs, [], Xs).
merge(.(X, Xs), .(Y, Ys), .(X, Zs)) :- ','(=(X, Y), merge(.(X, Xs), Ys, Zs)).

Queries:

mergesort(a,g).

(1) PredefinedPredicateTransformerProof (SOUND transformation)

Added definitions of predefined predicates [PROLOG].

(2) Obligation:

Clauses:

mergesort([], []).
mergesort(.(X, []), .(X, [])).
mergesort(.(X, .(Y, Xs)), Ys) :- ','(split(.(X, .(Y, Xs)), X1s, X2s), ','(mergesort(X1s, Y1s), ','(mergesort(X2s, Y2s), merge(Y1s, Y2s, Ys)))).
split([], [], []).
split(.(X, Xs), .(X, Ys), Zs) :- split(Xs, Zs, Ys).
merge([], Xs, Xs).
merge(Xs, [], Xs).
merge(.(X, Xs), .(Y, Ys), .(X, Zs)) :- ','(=(X, Y), merge(.(X, Xs), Ys, Zs)).
=(X, X).

Queries:

mergesort(a,g).

(3) BuiltinConflictTransformerProof (SOUND transformation)

Renamed defined predicates conflicting with built-in predicates [PROLOG].

(4) Obligation:

Clauses:

mergesort([], []).
mergesort(.(X, []), .(X, [])).
mergesort(.(X, .(Y, Xs)), Ys) :- ','(split(.(X, .(Y, Xs)), X1s, X2s), ','(mergesort(X1s, Y1s), ','(mergesort(X2s, Y2s), merge(Y1s, Y2s, Ys)))).
split([], [], []).
split(.(X, Xs), .(X, Ys), Zs) :- split(Xs, Zs, Ys).
merge([], Xs, Xs).
merge(Xs, [], Xs).
merge(.(X, Xs), .(Y, Ys), .(X, Zs)) :- ','(user_defined_=(X, Y), merge(.(X, Xs), Ys, Zs)).
user_defined_=(X, X).

Queries:

mergesort(a,g).

(5) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(6) Obligation:

Clauses:

split16([], [], []).
split16(.(T49, T51), .(T49, X88), X89) :- split16(T51, X89, X88).
split12(T42, T44, .(T42, X70), X71) :- split16(T44, X71, X70).
p34(T72, T73, T74, X122, X123, X124, X125, X126) :- split12(T72, .(T73, T74), X122, X123).
p34(T72, T73, T74, T78, T79, X124, X125, X126) :- ','(split12(T72, .(T73, T74), T78, T79), mergesort38(T78, X124)).
p34(T72, T73, T74, T78, T84, T83, X125, X126) :- ','(split12(T72, .(T73, T74), T78, T84), ','(mergesort38(T78, T83), mergesort38(T84, X125))).
p34(T72, T73, T74, T78, T84, T106, T105, X126) :- ','(split12(T72, .(T73, T74), T78, T84), ','(mergesort38(T78, T106), ','(mergesort38(T84, T105), merge54(T106, T105, X126)))).
mergesort38([], []).
mergesort38(.(T89, []), .(T89, [])).
mergesort38(.(T99, .(T100, T101)), X171) :- p34(T99, T100, T101, X167, X168, X169, X170, X171).
merge54([], T113, T113).
merge54(T118, [], T118).
merge54(.(T143, T144), .(T143, T142), .(T143, X213)) :- merge54(.(T143, T144), T142, X213).
mergesort25(T62, [], .(T62, [])).
mergesort25(T72, .(T73, T74), X126) :- p34(T72, T73, T74, X122, X123, X124, X125, X126).
merge72([], []).
merge72([], []).
merge152(T413, T414, [], .(T413, T414)).
merge152(T439, T441, .(T439, T440), .(T439, T429)) :- merge152(T439, T441, T440, T429).
mergesort1([], []).
mergesort1(.(T29, .(T27, T28)), []) :- split12(T27, T28, X41, X40).
mergesort1(.(T34, .(T27, T28)), []) :- ','(split12(T27, T28, T32, T33), mergesort25(T34, T33, X12)).
mergesort1(.(T34, .(T27, T28)), []) :- ','(split12(T27, T28, T55, T33), ','(mergesort25(T34, T33, T54), mergesort38(T55, X13))).
mergesort1(.(T34, .(T27, T28)), []) :- ','(split12(T27, T28, T55, T33), ','(mergesort25(T34, T33, T150), ','(mergesort38(T55, T149), merge72(T150, T149)))).
mergesort1(.(T168, []), .(T168, [])).
mergesort1(.(T196, .(T194, T195)), .(T176, [])) :- split12(T194, T195, X292, X291).
mergesort1(.(T201, .(T194, T195)), .(T176, [])) :- ','(split12(T194, T195, T199, T200), mergesort25(T201, T200, X263)).
mergesort1(.(T201, .(T194, T195)), .(T176, [])) :- ','(split12(T194, T195, T207, T200), ','(mergesort25(T201, T200, T206), mergesort38(T207, X264))).
mergesort1(.(T201, .(T194, T195)), .(T225, [])) :- ','(split12(T194, T195, T207, T200), ','(mergesort25(T201, T200, []), mergesort38(T207, .(T225, [])))).
mergesort1(.(T201, .(T194, T195)), .(T235, [])) :- ','(split12(T194, T195, T207, T200), ','(mergesort25(T201, T200, .(T235, [])), mergesort38(T207, []))).
mergesort1(.(T201, .(T194, T195)), .(T261, [])) :- ','(split12(T194, T195, T207, T200), ','(mergesort25(T201, T200, .(T261, T263)), ','(mergesort38(T207, .(T261, T262)), merge72(.(T261, T263), T262)))).
mergesort1(.(T299, .(T297, T298)), T279) :- split12(T297, T298, X404, X403).
mergesort1(.(T304, .(T297, T298)), T279) :- ','(split12(T297, T298, T302, T303), mergesort25(T304, T303, X375)).
mergesort1(.(T304, .(T297, T298)), T279) :- ','(split12(T297, T298, T312, T303), ','(mergesort25(T304, T303, T311), mergesort38(T312, X376))).
mergesort1(.(T304, .(T297, T298)), T327) :- ','(split12(T297, T298, T312, T303), ','(mergesort25(T304, T303, []), mergesort38(T312, T327))).
mergesort1(.(T304, .(T297, T298)), T332) :- ','(split12(T297, T298, T312, T303), ','(mergesort25(T304, T303, T332), mergesort38(T312, []))).
mergesort1(.(T304, .(T297, T298)), .(T372, .(T372, T373))) :- ','(split12(T297, T298, T312, T303), ','(mergesort25(T304, T303, .(T372, T373)), mergesort38(T312, .(T372, [])))).
mergesort1(.(T304, .(T297, T298)), .(T398, .(T398, T388))) :- ','(split12(T297, T298, T312, T303), ','(mergesort25(T304, T303, .(T398, T400)), ','(mergesort38(T312, .(T398, .(T398, T399))), merge152(T398, T400, T399, T388)))).

Queries:

mergesort1(a,g).

(7) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
mergesort1_in: (f,b)
split12_in: (f,f,f,f) (f,b,f,f)
split16_in: (f,f,f) (b,f,f)
mergesort25_in: (f,b,f) (f,b,b)
p34_in: (f,f,b,f,f,f,f,f) (f,f,b,f,f,f,f,b)
mergesort38_in: (b,f) (b,b)
merge54_in: (f,f,f) (f,f,b)
merge152_in: (f,f,f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(8) Obligation:

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

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)

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

MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → U17_AG(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → SPLIT12_IN_AAAA(T27, T28, X41, X40)
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → U2_AAAA(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_AAA(T44, X71, X70)
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → U1_AAA(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U18_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_AG(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → MERGESORT25_IN_AGA(T34, T33, X12)
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → U15_AGA(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → U2_AGAA(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_GAA(T44, X71, X70)
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → U1_GAA(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → U13_GA(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAA(T106, T105, X126)
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAA(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U20_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → MERGESORT25_IN_AGA(T34, T33, T54)
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_AG(T34, T27, T28, mergesort38_in_ga(T55, X13))
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → MERGESORT38_IN_GA(T55, X13)
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_AG(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → MERGESORT38_IN_GA(T55, T149)
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_AG(T34, T27, T28, merge72_in_aa(T150, T149))
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → MERGE72_IN_AA(T150, T149)
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → U26_AG(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → SPLIT12_IN_AAAA(T194, T195, X292, X291)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U27_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_AG(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → MERGESORT25_IN_AGA(T201, T200, X263)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U29_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_AG(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, T206)
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_AG(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → MERGESORT38_IN_GA(T207, X264)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T225, [])) → U32_AG(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_AG(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, [])
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → U15_AGG(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAG(T106, T105, X126)
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAG(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_AG(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → MERGESORT38_IN_GG(T207, .(T225, []))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → U13_GG(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAG(T99, T100, T101, X167, X168, X169, X170, X171)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T235, [])) → U35_AG(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_AG(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, .(T235, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_AG(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → MERGESORT38_IN_GG(T207, [])
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T261, [])) → U38_AG(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_AG(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, .(T261, T263))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_AG(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → MERGESORT38_IN_GA(T207, .(T261, T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_AG(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → MERGE72_IN_AA(.(T261, T263), T262)
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → U42_AG(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → SPLIT12_IN_AAAA(T297, T298, X404, X403)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U43_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_AG(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → MERGESORT25_IN_AGA(T304, T303, X375)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U45_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_AG(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, T311)
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_AG(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → MERGESORT38_IN_GA(T312, X376)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T327) → U48_AG(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_AG(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, [])
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_AG(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → MERGESORT38_IN_GG(T312, T327)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T332) → U51_AG(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_AG(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, T332)
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_AG(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → MERGESORT38_IN_GG(T312, [])
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_AG(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → SPLIT12_IN_AAAA(T297, T298, T312, T303)
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, .(T372, T373))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_AG(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → MERGESORT38_IN_GG(T312, .(T372, []))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_AG(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, .(T398, T400))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → MERGESORT38_IN_GA(T312, .(T398, .(T398, T399)))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_AG(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → MERGE152_IN_AAAG(T398, T400, T399, T388)
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → U16_AAAG(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
MERGESORT1_IN_AG(x1, x2)  =  MERGESORT1_IN_AG(x2)
U17_AG(x1, x2, x3, x4)  =  U17_AG(x4)
SPLIT12_IN_AAAA(x1, x2, x3, x4)  =  SPLIT12_IN_AAAA
U2_AAAA(x1, x2, x3, x4, x5)  =  U2_AAAA(x5)
SPLIT16_IN_AAA(x1, x2, x3)  =  SPLIT16_IN_AAA
U1_AAA(x1, x2, x3, x4, x5)  =  U1_AAA(x5)
U18_AG(x1, x2, x3, x4)  =  U18_AG(x4)
U19_AG(x1, x2, x3, x4)  =  U19_AG(x3, x4)
MERGESORT25_IN_AGA(x1, x2, x3)  =  MERGESORT25_IN_AGA(x2)
U15_AGA(x1, x2, x3, x4, x5)  =  U15_AGA(x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U3_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAA(x9)
SPLIT12_IN_AGAA(x1, x2, x3, x4)  =  SPLIT12_IN_AGAA(x2)
U2_AGAA(x1, x2, x3, x4, x5)  =  U2_AGAA(x5)
SPLIT16_IN_GAA(x1, x2, x3)  =  SPLIT16_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4, x5)  =  U1_GAA(x5)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x9)
U5_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAA(x4, x5, x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x5)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x4, x5, x9)
U8_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAA(x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x4, x5, x9)
U11_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAA(x4, x5, x9)
U12_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAA(x4, x5, x9)
MERGE54_IN_AAA(x1, x2, x3)  =  MERGE54_IN_AAA
U14_AAA(x1, x2, x3, x4, x5)  =  U14_AAA(x5)
U20_AG(x1, x2, x3, x4)  =  U20_AG(x4)
U21_AG(x1, x2, x3, x4, x5)  =  U21_AG(x3, x4, x5)
U22_AG(x1, x2, x3, x4)  =  U22_AG(x3, x4)
U23_AG(x1, x2, x3, x4, x5)  =  U23_AG(x3, x4, x5)
U24_AG(x1, x2, x3, x4, x5)  =  U24_AG(x3, x5)
U25_AG(x1, x2, x3, x4)  =  U25_AG(x3, x4)
MERGE72_IN_AA(x1, x2)  =  MERGE72_IN_AA
U26_AG(x1, x2, x3, x4, x5)  =  U26_AG(x5)
U27_AG(x1, x2, x3, x4, x5)  =  U27_AG(x5)
U28_AG(x1, x2, x3, x4, x5)  =  U28_AG(x3, x5)
U29_AG(x1, x2, x3, x4, x5)  =  U29_AG(x5)
U30_AG(x1, x2, x3, x4, x5, x6)  =  U30_AG(x3, x5, x6)
U31_AG(x1, x2, x3, x4, x5)  =  U31_AG(x3, x5)
U32_AG(x1, x2, x3, x4, x5)  =  U32_AG(x5)
U33_AG(x1, x2, x3, x4, x5, x6)  =  U33_AG(x3, x5, x6)
MERGESORT25_IN_AGG(x1, x2, x3)  =  MERGESORT25_IN_AGG(x2, x3)
U15_AGG(x1, x2, x3, x4, x5)  =  U15_AGG(x5)
P34_IN_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAG(x3, x8)
U3_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAG(x9)
U4_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAG(x9)
U5_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAG(x4, x5, x9)
U6_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAG(x9)
U7_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAG(x4, x5, x9)
U8_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAG(x4, x5, x9)
U9_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAG(x8, x9)
U10_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAG(x4, x5, x8, x9)
U11_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAG(x4, x5, x8, x9)
U12_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAG(x4, x5, x9)
MERGE54_IN_AAG(x1, x2, x3)  =  MERGE54_IN_AAG(x3)
U14_AAG(x1, x2, x3, x4, x5)  =  U14_AAG(x5)
U34_AG(x1, x2, x3, x4, x5)  =  U34_AG(x3, x5)
MERGESORT38_IN_GG(x1, x2)  =  MERGESORT38_IN_GG(x1, x2)
U13_GG(x1, x2, x3, x4, x5)  =  U13_GG(x5)
U35_AG(x1, x2, x3, x4, x5)  =  U35_AG(x5)
U36_AG(x1, x2, x3, x4, x5, x6)  =  U36_AG(x3, x5, x6)
U37_AG(x1, x2, x3, x4, x5)  =  U37_AG(x3, x5)
U38_AG(x1, x2, x3, x4, x5)  =  U38_AG(x5)
U39_AG(x1, x2, x3, x4, x5, x6)  =  U39_AG(x3, x5, x6)
U40_AG(x1, x2, x3, x4, x5, x6)  =  U40_AG(x3, x6)
U41_AG(x1, x2, x3, x4, x5)  =  U41_AG(x3, x5)
U42_AG(x1, x2, x3, x4, x5)  =  U42_AG(x5)
U43_AG(x1, x2, x3, x4, x5)  =  U43_AG(x5)
U44_AG(x1, x2, x3, x4, x5)  =  U44_AG(x3, x5)
U45_AG(x1, x2, x3, x4, x5)  =  U45_AG(x5)
U46_AG(x1, x2, x3, x4, x5, x6)  =  U46_AG(x3, x5, x6)
U47_AG(x1, x2, x3, x4, x5)  =  U47_AG(x3, x5)
U48_AG(x1, x2, x3, x4, x5)  =  U48_AG(x4, x5)
U49_AG(x1, x2, x3, x4, x5, x6)  =  U49_AG(x3, x4, x5, x6)
U50_AG(x1, x2, x3, x4, x5)  =  U50_AG(x3, x5)
U51_AG(x1, x2, x3, x4, x5)  =  U51_AG(x4, x5)
U52_AG(x1, x2, x3, x4, x5, x6)  =  U52_AG(x3, x5, x6)
U53_AG(x1, x2, x3, x4, x5)  =  U53_AG(x3, x5)
U54_AG(x1, x2, x3, x4, x5, x6)  =  U54_AG(x5, x6)
U55_AG(x1, x2, x3, x4, x5, x6, x7)  =  U55_AG(x3, x6, x7)
U56_AG(x1, x2, x3, x4, x5, x6)  =  U56_AG(x3, x6)
U57_AG(x1, x2, x3, x4, x5, x6)  =  U57_AG(x5, x6)
U58_AG(x1, x2, x3, x4, x5, x6, x7)  =  U58_AG(x3, x5, x6, x7)
U59_AG(x1, x2, x3, x4, x5, x6, x7)  =  U59_AG(x3, x5, x7)
U60_AG(x1, x2, x3, x4, x5, x6)  =  U60_AG(x3, x6)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)
U16_AAAG(x1, x2, x3, x4, x5)  =  U16_AAAG(x5)

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

(10) Obligation:

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

MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → U17_AG(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → SPLIT12_IN_AAAA(T27, T28, X41, X40)
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → U2_AAAA(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_AAA(T44, X71, X70)
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → U1_AAA(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U18_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_AG(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → MERGESORT25_IN_AGA(T34, T33, X12)
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → U15_AGA(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → U2_AGAA(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_GAA(T44, X71, X70)
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → U1_GAA(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → U13_GA(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAA(T106, T105, X126)
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAA(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U20_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → MERGESORT25_IN_AGA(T34, T33, T54)
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_AG(T34, T27, T28, mergesort38_in_ga(T55, X13))
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → MERGESORT38_IN_GA(T55, X13)
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_AG(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → MERGESORT38_IN_GA(T55, T149)
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_AG(T34, T27, T28, merge72_in_aa(T150, T149))
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → MERGE72_IN_AA(T150, T149)
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → U26_AG(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → SPLIT12_IN_AAAA(T194, T195, X292, X291)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U27_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_AG(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → MERGESORT25_IN_AGA(T201, T200, X263)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U29_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_AG(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, T206)
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_AG(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → MERGESORT38_IN_GA(T207, X264)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T225, [])) → U32_AG(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_AG(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, [])
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → U15_AGG(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAG(T106, T105, X126)
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAG(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_AG(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → MERGESORT38_IN_GG(T207, .(T225, []))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → U13_GG(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAG(T99, T100, T101, X167, X168, X169, X170, X171)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T235, [])) → U35_AG(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_AG(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, .(T235, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_AG(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → MERGESORT38_IN_GG(T207, [])
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T261, [])) → U38_AG(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_AG(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, .(T261, T263))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_AG(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → MERGESORT38_IN_GA(T207, .(T261, T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_AG(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → MERGE72_IN_AA(.(T261, T263), T262)
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → U42_AG(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → SPLIT12_IN_AAAA(T297, T298, X404, X403)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U43_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_AG(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → MERGESORT25_IN_AGA(T304, T303, X375)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U45_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_AG(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, T311)
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_AG(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → MERGESORT38_IN_GA(T312, X376)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T327) → U48_AG(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_AG(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, [])
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_AG(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → MERGESORT38_IN_GG(T312, T327)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T332) → U51_AG(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_AG(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, T332)
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_AG(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → MERGESORT38_IN_GG(T312, [])
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_AG(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → SPLIT12_IN_AAAA(T297, T298, T312, T303)
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, .(T372, T373))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_AG(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → MERGESORT38_IN_GG(T312, .(T372, []))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_AG(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, .(T398, T400))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → MERGESORT38_IN_GA(T312, .(T398, .(T398, T399)))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_AG(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → MERGE152_IN_AAAG(T398, T400, T399, T388)
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → U16_AAAG(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
MERGESORT1_IN_AG(x1, x2)  =  MERGESORT1_IN_AG(x2)
U17_AG(x1, x2, x3, x4)  =  U17_AG(x4)
SPLIT12_IN_AAAA(x1, x2, x3, x4)  =  SPLIT12_IN_AAAA
U2_AAAA(x1, x2, x3, x4, x5)  =  U2_AAAA(x5)
SPLIT16_IN_AAA(x1, x2, x3)  =  SPLIT16_IN_AAA
U1_AAA(x1, x2, x3, x4, x5)  =  U1_AAA(x5)
U18_AG(x1, x2, x3, x4)  =  U18_AG(x4)
U19_AG(x1, x2, x3, x4)  =  U19_AG(x3, x4)
MERGESORT25_IN_AGA(x1, x2, x3)  =  MERGESORT25_IN_AGA(x2)
U15_AGA(x1, x2, x3, x4, x5)  =  U15_AGA(x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U3_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAA(x9)
SPLIT12_IN_AGAA(x1, x2, x3, x4)  =  SPLIT12_IN_AGAA(x2)
U2_AGAA(x1, x2, x3, x4, x5)  =  U2_AGAA(x5)
SPLIT16_IN_GAA(x1, x2, x3)  =  SPLIT16_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4, x5)  =  U1_GAA(x5)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x9)
U5_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAA(x4, x5, x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x5)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x4, x5, x9)
U8_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAA(x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x4, x5, x9)
U11_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAA(x4, x5, x9)
U12_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAA(x4, x5, x9)
MERGE54_IN_AAA(x1, x2, x3)  =  MERGE54_IN_AAA
U14_AAA(x1, x2, x3, x4, x5)  =  U14_AAA(x5)
U20_AG(x1, x2, x3, x4)  =  U20_AG(x4)
U21_AG(x1, x2, x3, x4, x5)  =  U21_AG(x3, x4, x5)
U22_AG(x1, x2, x3, x4)  =  U22_AG(x3, x4)
U23_AG(x1, x2, x3, x4, x5)  =  U23_AG(x3, x4, x5)
U24_AG(x1, x2, x3, x4, x5)  =  U24_AG(x3, x5)
U25_AG(x1, x2, x3, x4)  =  U25_AG(x3, x4)
MERGE72_IN_AA(x1, x2)  =  MERGE72_IN_AA
U26_AG(x1, x2, x3, x4, x5)  =  U26_AG(x5)
U27_AG(x1, x2, x3, x4, x5)  =  U27_AG(x5)
U28_AG(x1, x2, x3, x4, x5)  =  U28_AG(x3, x5)
U29_AG(x1, x2, x3, x4, x5)  =  U29_AG(x5)
U30_AG(x1, x2, x3, x4, x5, x6)  =  U30_AG(x3, x5, x6)
U31_AG(x1, x2, x3, x4, x5)  =  U31_AG(x3, x5)
U32_AG(x1, x2, x3, x4, x5)  =  U32_AG(x5)
U33_AG(x1, x2, x3, x4, x5, x6)  =  U33_AG(x3, x5, x6)
MERGESORT25_IN_AGG(x1, x2, x3)  =  MERGESORT25_IN_AGG(x2, x3)
U15_AGG(x1, x2, x3, x4, x5)  =  U15_AGG(x5)
P34_IN_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAG(x3, x8)
U3_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAG(x9)
U4_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAG(x9)
U5_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAG(x4, x5, x9)
U6_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAG(x9)
U7_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAG(x4, x5, x9)
U8_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAG(x4, x5, x9)
U9_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAG(x8, x9)
U10_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAG(x4, x5, x8, x9)
U11_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAG(x4, x5, x8, x9)
U12_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAG(x4, x5, x9)
MERGE54_IN_AAG(x1, x2, x3)  =  MERGE54_IN_AAG(x3)
U14_AAG(x1, x2, x3, x4, x5)  =  U14_AAG(x5)
U34_AG(x1, x2, x3, x4, x5)  =  U34_AG(x3, x5)
MERGESORT38_IN_GG(x1, x2)  =  MERGESORT38_IN_GG(x1, x2)
U13_GG(x1, x2, x3, x4, x5)  =  U13_GG(x5)
U35_AG(x1, x2, x3, x4, x5)  =  U35_AG(x5)
U36_AG(x1, x2, x3, x4, x5, x6)  =  U36_AG(x3, x5, x6)
U37_AG(x1, x2, x3, x4, x5)  =  U37_AG(x3, x5)
U38_AG(x1, x2, x3, x4, x5)  =  U38_AG(x5)
U39_AG(x1, x2, x3, x4, x5, x6)  =  U39_AG(x3, x5, x6)
U40_AG(x1, x2, x3, x4, x5, x6)  =  U40_AG(x3, x6)
U41_AG(x1, x2, x3, x4, x5)  =  U41_AG(x3, x5)
U42_AG(x1, x2, x3, x4, x5)  =  U42_AG(x5)
U43_AG(x1, x2, x3, x4, x5)  =  U43_AG(x5)
U44_AG(x1, x2, x3, x4, x5)  =  U44_AG(x3, x5)
U45_AG(x1, x2, x3, x4, x5)  =  U45_AG(x5)
U46_AG(x1, x2, x3, x4, x5, x6)  =  U46_AG(x3, x5, x6)
U47_AG(x1, x2, x3, x4, x5)  =  U47_AG(x3, x5)
U48_AG(x1, x2, x3, x4, x5)  =  U48_AG(x4, x5)
U49_AG(x1, x2, x3, x4, x5, x6)  =  U49_AG(x3, x4, x5, x6)
U50_AG(x1, x2, x3, x4, x5)  =  U50_AG(x3, x5)
U51_AG(x1, x2, x3, x4, x5)  =  U51_AG(x4, x5)
U52_AG(x1, x2, x3, x4, x5, x6)  =  U52_AG(x3, x5, x6)
U53_AG(x1, x2, x3, x4, x5)  =  U53_AG(x3, x5)
U54_AG(x1, x2, x3, x4, x5, x6)  =  U54_AG(x5, x6)
U55_AG(x1, x2, x3, x4, x5, x6, x7)  =  U55_AG(x3, x6, x7)
U56_AG(x1, x2, x3, x4, x5, x6)  =  U56_AG(x3, x6)
U57_AG(x1, x2, x3, x4, x5, x6)  =  U57_AG(x5, x6)
U58_AG(x1, x2, x3, x4, x5, x6, x7)  =  U58_AG(x3, x5, x6, x7)
U59_AG(x1, x2, x3, x4, x5, x6, x7)  =  U59_AG(x3, x5, x7)
U60_AG(x1, x2, x3, x4, x5, x6)  =  U60_AG(x3, x6)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)
U16_AAAG(x1, x2, x3, x4, x5)  =  U16_AAAG(x5)

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

(11) DependencyGraphProof (EQUIVALENT transformation)

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

(12) Complex Obligation (AND)

(13) Obligation:

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

MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)

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

(14) UsableRulesProof (EQUIVALENT transformation)

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

(15) Obligation:

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

MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)

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

(16) PiDPToQDPProof (SOUND transformation)

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

(17) Obligation:

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

MERGE152_IN_AAAG(.(T429)) → MERGE152_IN_AAAG(T429)

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

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

  • MERGE152_IN_AAAG(.(T429)) → MERGE152_IN_AAAG(T429)
    The graph contains the following edges 1 > 1

(19) YES

(20) Obligation:

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

MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
MERGE54_IN_AAG(x1, x2, x3)  =  MERGE54_IN_AAG(x3)

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

(21) UsableRulesProof (EQUIVALENT transformation)

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

(22) Obligation:

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

MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)

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

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

(23) PiDPToQDPProof (SOUND transformation)

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

(24) Obligation:

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

MERGE54_IN_AAG(.(X213)) → MERGE54_IN_AAG(X213)

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

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

  • MERGE54_IN_AAG(.(X213)) → MERGE54_IN_AAG(X213)
    The graph contains the following edges 1 > 1

(26) YES

(27) Obligation:

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

MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
MERGE54_IN_AAA(x1, x2, x3)  =  MERGE54_IN_AAA

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

(28) UsableRulesProof (EQUIVALENT transformation)

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

(29) Obligation:

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

MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)

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

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

(30) PiDPToQDPProof (SOUND transformation)

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

(31) Obligation:

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

MERGE54_IN_AAAMERGE54_IN_AAA

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

(32) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = MERGE54_IN_AAA evaluates to t =MERGE54_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from MERGE54_IN_AAA to MERGE54_IN_AAA.



(33) NO

(34) Obligation:

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

SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
SPLIT16_IN_GAA(x1, x2, x3)  =  SPLIT16_IN_GAA(x1)

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

(35) UsableRulesProof (EQUIVALENT transformation)

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

(36) Obligation:

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

SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)

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

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

(37) PiDPToQDPProof (SOUND transformation)

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

(38) Obligation:

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

SPLIT16_IN_GAA(.(T51)) → SPLIT16_IN_GAA(T51)

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

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

  • SPLIT16_IN_GAA(.(T51)) → SPLIT16_IN_GAA(T51)
    The graph contains the following edges 1 > 1

(40) YES

(41) Obligation:

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

P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x4, x5, x9)

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

(42) UsableRulesProof (EQUIVALENT transformation)

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

(43) Obligation:

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

P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)

The TRS R consists of the following rules:

split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x4, x5, x9)

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

(44) PiDPToQDPProof (SOUND transformation)

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

(45) Obligation:

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

P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(split12_in_agaa(.(T74)))
U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(split12_in_agaa(.(T74)))
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(split12_in_agaa(.(T74)))
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(46) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(split12_in_agaa(.(T74))) at position [0] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))

(47) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(split12_in_agaa(.(T74)))
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(split12_in_agaa(.(T74)))
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(48) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(split12_in_agaa(.(T74))) at position [0] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))

(49) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(split12_in_agaa(.(T74)))
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(50) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(split12_in_agaa(.(T74))) at position [0] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))

(51) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(52) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74)))) at position [0,0] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

(53) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(54) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74)))) at position [0,0] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

(55) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(56) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(split16_in_gaa(.(T74)))) at position [0,0] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

(57) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(58) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial Order [NEGPOLO,POLO] with Interpretation:

POL( U10_AAGAAAAA(x1, ..., x3) ) = x2


POL( U7_AAGAAAAA(x1, ..., x3) ) = x2


POL( mergesort38_in_ga(x1) ) = 2


POL( [] ) = 0


POL( mergesort38_out_ga ) = 0


POL( .(x1) ) = 2x1 + 1


POL( U13_ga(x1) ) = 1


POL( p34_in_aagaaaaa(x1) ) = max{0, x1 - 2}


POL( U2_agaa(x1) ) = x1 + 2


POL( U4_aagaaaaa(x1) ) = max{0, -1}


POL( U6_aagaaaaa(x1) ) = max{0, -1}


POL( U9_aagaaaaa(x1) ) = 2


POL( U1_gaa(x1) ) = 2x1


POL( U4_AAGAAAAA(x1) ) = max{0, x1 - 2}


POL( U6_AAGAAAAA(x1) ) = max{0, x1 - 2}


POL( U9_AAGAAAAA(x1) ) = max{0, x1 - 2}


POL( U3_aagaaaaa(x1) ) = 1


POL( split16_in_gaa(x1) ) = x1 + 1


POL( split16_out_gaa(x1, x2) ) = x1 + 2x2 + 1


POL( split12_out_agaa(x1, x2) ) = x1 + x2 + 2


POL( split12_in_agaa(x1) ) = 1


POL( U5_aagaaaaa(x1, ..., x3) ) = max{0, -1}


POL( p34_out_aagaaaaa(x1, x2) ) = max{0, -1}


POL( U7_aagaaaaa(x1, ..., x3) ) = 2x1 + x2 + x3 + 2


POL( U8_aagaaaaa(x1, ..., x3) ) = max{0, x1 + 2x2 - 2}


POL( U10_aagaaaaa(x1, ..., x3) ) = max{0, -2}


POL( U11_aagaaaaa(x1, ..., x3) ) = max{0, x1 + x2 - 2}


POL( U12_aagaaaaa(x1, ..., x3) ) = max{0, -1}


POL( merge54_in_aaa ) = 2


POL( merge54_out_aaa ) = 1


POL( U14_aaa(x1) ) = x1 + 2


POL( MERGESORT38_IN_GA(x1) ) = x1


POL( P34_IN_AAGAAAAA(x1) ) = 2x1 + 2



The following usable rules [FROCOS05] were oriented:

split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)

(59) Obligation:

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

U4_AAGAAAAA(split12_out_agaa(T78, T79)) → MERGESORT38_IN_GA(T78)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → U7_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → U10_AAGAAAAA(T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T78, T84, mergesort38_out_ga) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(split12_out_agaa(T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(U2_agaa(U1_gaa(split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga
mergesort38_in_ga(.([])) → mergesort38_out_ga
mergesort38_in_ga(.(.(T101))) → U13_ga(p34_in_aagaaaaa(T101))
U2_agaa(split16_out_gaa(X71, X70)) → split12_out_agaa(.(X70), X71)
U13_ga(p34_out_aagaaaaa(X167, X168)) → mergesort38_out_ga
split16_in_gaa([]) → split16_out_gaa([], [])
split16_in_gaa(.(T51)) → U1_gaa(split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(split12_in_agaa(.(T74)))
U1_gaa(split16_out_gaa(X89, X88)) → split16_out_gaa(.(X88), X89)
U3_aagaaaaa(split12_out_agaa(X122, X123)) → p34_out_aagaaaaa(X122, X123)
U4_aagaaaaa(split12_out_agaa(T78, T79)) → U5_aagaaaaa(T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(split12_out_agaa(T78, T84)) → U7_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(split12_out_agaa(T78, T84)) → U10_aagaaaaa(T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T78, T79, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T79)
U7_aagaaaaa(T78, T84, mergesort38_out_ga) → U8_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T78, T84, mergesort38_out_ga) → U11_aagaaaaa(T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T78, T84, mergesort38_out_ga) → p34_out_aagaaaaa(T78, T84)
U11_aagaaaaa(T78, T84, mergesort38_out_ga) → U12_aagaaaaa(T78, T84, merge54_in_aaa)
U12_aagaaaaa(T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0)
U13_ga(x0)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0)
U3_aagaaaaa(x0)
U4_aagaaaaa(x0)
U6_aagaaaaa(x0)
U9_aagaaaaa(x0)
U5_aagaaaaa(x0, x1, x2)
U7_aagaaaaa(x0, x1, x2)
U10_aagaaaaa(x0, x1, x2)
U8_aagaaaaa(x0, x1, x2)
U11_aagaaaaa(x0, x1, x2)
U12_aagaaaaa(x0, x1, x2)
merge54_in_aaa
U14_aaa(x0)

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

(60) DependencyGraphProof (EQUIVALENT transformation)

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

(61) TRUE

(62) Obligation:

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

SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x4, x5)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x4, x5, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x4, x5, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x4, x5, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x4, x5, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x5)
SPLIT16_IN_AAA(x1, x2, x3)  =  SPLIT16_IN_AAA

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

(63) UsableRulesProof (EQUIVALENT transformation)

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

(64) Obligation:

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

SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)

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

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

(65) PiDPToQDPProof (SOUND transformation)

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

(66) Obligation:

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

SPLIT16_IN_AAASPLIT16_IN_AAA

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

(67) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = SPLIT16_IN_AAA evaluates to t =SPLIT16_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SPLIT16_IN_AAA to SPLIT16_IN_AAA.



(68) NO

(69) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
mergesort1_in: (f,b)
split12_in: (f,f,f,f) (f,b,f,f)
split16_in: (f,f,f) (b,f,f)
mergesort25_in: (f,b,f) (f,b,b)
p34_in: (f,f,b,f,f,f,f,f) (f,f,b,f,f,f,f,b)
mergesort38_in: (b,f) (b,b)
merge54_in: (f,f,f) (f,f,b)
merge152_in: (f,f,f,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(70) Obligation:

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

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)

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

MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → U17_AG(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → SPLIT12_IN_AAAA(T27, T28, X41, X40)
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → U2_AAAA(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_AAA(T44, X71, X70)
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → U1_AAA(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U18_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_AG(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → MERGESORT25_IN_AGA(T34, T33, X12)
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → U15_AGA(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → U2_AGAA(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_GAA(T44, X71, X70)
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → U1_GAA(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → U13_GA(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAA(T106, T105, X126)
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAA(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U20_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → MERGESORT25_IN_AGA(T34, T33, T54)
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_AG(T34, T27, T28, mergesort38_in_ga(T55, X13))
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → MERGESORT38_IN_GA(T55, X13)
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_AG(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → MERGESORT38_IN_GA(T55, T149)
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_AG(T34, T27, T28, merge72_in_aa(T150, T149))
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → MERGE72_IN_AA(T150, T149)
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → U26_AG(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → SPLIT12_IN_AAAA(T194, T195, X292, X291)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U27_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_AG(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → MERGESORT25_IN_AGA(T201, T200, X263)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U29_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_AG(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, T206)
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_AG(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → MERGESORT38_IN_GA(T207, X264)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T225, [])) → U32_AG(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_AG(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, [])
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → U15_AGG(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAG(T106, T105, X126)
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAG(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_AG(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → MERGESORT38_IN_GG(T207, .(T225, []))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → U13_GG(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAG(T99, T100, T101, X167, X168, X169, X170, X171)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T235, [])) → U35_AG(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_AG(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, .(T235, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_AG(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → MERGESORT38_IN_GG(T207, [])
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T261, [])) → U38_AG(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_AG(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, .(T261, T263))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_AG(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → MERGESORT38_IN_GA(T207, .(T261, T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_AG(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → MERGE72_IN_AA(.(T261, T263), T262)
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → U42_AG(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → SPLIT12_IN_AAAA(T297, T298, X404, X403)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U43_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_AG(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → MERGESORT25_IN_AGA(T304, T303, X375)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U45_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_AG(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, T311)
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_AG(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → MERGESORT38_IN_GA(T312, X376)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T327) → U48_AG(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_AG(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, [])
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_AG(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → MERGESORT38_IN_GG(T312, T327)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T332) → U51_AG(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_AG(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, T332)
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_AG(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → MERGESORT38_IN_GG(T312, [])
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_AG(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → SPLIT12_IN_AAAA(T297, T298, T312, T303)
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, .(T372, T373))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_AG(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → MERGESORT38_IN_GG(T312, .(T372, []))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_AG(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, .(T398, T400))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → MERGESORT38_IN_GA(T312, .(T398, .(T398, T399)))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_AG(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → MERGE152_IN_AAAG(T398, T400, T399, T388)
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → U16_AAAG(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
MERGESORT1_IN_AG(x1, x2)  =  MERGESORT1_IN_AG(x2)
U17_AG(x1, x2, x3, x4)  =  U17_AG(x4)
SPLIT12_IN_AAAA(x1, x2, x3, x4)  =  SPLIT12_IN_AAAA
U2_AAAA(x1, x2, x3, x4, x5)  =  U2_AAAA(x5)
SPLIT16_IN_AAA(x1, x2, x3)  =  SPLIT16_IN_AAA
U1_AAA(x1, x2, x3, x4, x5)  =  U1_AAA(x5)
U18_AG(x1, x2, x3, x4)  =  U18_AG(x4)
U19_AG(x1, x2, x3, x4)  =  U19_AG(x3, x4)
MERGESORT25_IN_AGA(x1, x2, x3)  =  MERGESORT25_IN_AGA(x2)
U15_AGA(x1, x2, x3, x4, x5)  =  U15_AGA(x3, x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U3_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAA(x3, x9)
SPLIT12_IN_AGAA(x1, x2, x3, x4)  =  SPLIT12_IN_AGAA(x2)
U2_AGAA(x1, x2, x3, x4, x5)  =  U2_AGAA(x2, x5)
SPLIT16_IN_GAA(x1, x2, x3)  =  SPLIT16_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4, x5)  =  U1_GAA(x2, x5)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x3, x9)
U5_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAA(x3, x4, x5, x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x3, x5)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x3, x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x3, x4, x5, x9)
U8_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAA(x3, x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x3, x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x3, x4, x5, x9)
U11_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAA(x3, x4, x5, x9)
U12_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAA(x3, x4, x5, x9)
MERGE54_IN_AAA(x1, x2, x3)  =  MERGE54_IN_AAA
U14_AAA(x1, x2, x3, x4, x5)  =  U14_AAA(x5)
U20_AG(x1, x2, x3, x4)  =  U20_AG(x4)
U21_AG(x1, x2, x3, x4, x5)  =  U21_AG(x3, x4, x5)
U22_AG(x1, x2, x3, x4)  =  U22_AG(x3, x4)
U23_AG(x1, x2, x3, x4, x5)  =  U23_AG(x3, x4, x5)
U24_AG(x1, x2, x3, x4, x5)  =  U24_AG(x3, x5)
U25_AG(x1, x2, x3, x4)  =  U25_AG(x3, x4)
MERGE72_IN_AA(x1, x2)  =  MERGE72_IN_AA
U26_AG(x1, x2, x3, x4, x5)  =  U26_AG(x5)
U27_AG(x1, x2, x3, x4, x5)  =  U27_AG(x5)
U28_AG(x1, x2, x3, x4, x5)  =  U28_AG(x3, x5)
U29_AG(x1, x2, x3, x4, x5)  =  U29_AG(x5)
U30_AG(x1, x2, x3, x4, x5, x6)  =  U30_AG(x3, x5, x6)
U31_AG(x1, x2, x3, x4, x5)  =  U31_AG(x3, x5)
U32_AG(x1, x2, x3, x4, x5)  =  U32_AG(x5)
U33_AG(x1, x2, x3, x4, x5, x6)  =  U33_AG(x3, x5, x6)
MERGESORT25_IN_AGG(x1, x2, x3)  =  MERGESORT25_IN_AGG(x2, x3)
U15_AGG(x1, x2, x3, x4, x5)  =  U15_AGG(x3, x4, x5)
P34_IN_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAG(x3, x8)
U3_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAG(x3, x8, x9)
U4_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAG(x3, x8, x9)
U5_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAG(x3, x4, x5, x8, x9)
U6_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAG(x3, x8, x9)
U7_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAG(x3, x4, x5, x8, x9)
U8_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAG(x3, x4, x5, x8, x9)
U9_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAG(x3, x8, x9)
U10_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAG(x3, x4, x5, x8, x9)
U11_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAG(x3, x4, x5, x8, x9)
U12_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAG(x3, x4, x5, x8, x9)
MERGE54_IN_AAG(x1, x2, x3)  =  MERGE54_IN_AAG(x3)
U14_AAG(x1, x2, x3, x4, x5)  =  U14_AAG(x4, x5)
U34_AG(x1, x2, x3, x4, x5)  =  U34_AG(x3, x5)
MERGESORT38_IN_GG(x1, x2)  =  MERGESORT38_IN_GG(x1, x2)
U13_GG(x1, x2, x3, x4, x5)  =  U13_GG(x3, x4, x5)
U35_AG(x1, x2, x3, x4, x5)  =  U35_AG(x5)
U36_AG(x1, x2, x3, x4, x5, x6)  =  U36_AG(x3, x5, x6)
U37_AG(x1, x2, x3, x4, x5)  =  U37_AG(x3, x5)
U38_AG(x1, x2, x3, x4, x5)  =  U38_AG(x5)
U39_AG(x1, x2, x3, x4, x5, x6)  =  U39_AG(x3, x5, x6)
U40_AG(x1, x2, x3, x4, x5, x6)  =  U40_AG(x3, x6)
U41_AG(x1, x2, x3, x4, x5)  =  U41_AG(x3, x5)
U42_AG(x1, x2, x3, x4, x5)  =  U42_AG(x4, x5)
U43_AG(x1, x2, x3, x4, x5)  =  U43_AG(x4, x5)
U44_AG(x1, x2, x3, x4, x5)  =  U44_AG(x3, x4, x5)
U45_AG(x1, x2, x3, x4, x5)  =  U45_AG(x4, x5)
U46_AG(x1, x2, x3, x4, x5, x6)  =  U46_AG(x3, x4, x5, x6)
U47_AG(x1, x2, x3, x4, x5)  =  U47_AG(x3, x4, x5)
U48_AG(x1, x2, x3, x4, x5)  =  U48_AG(x4, x5)
U49_AG(x1, x2, x3, x4, x5, x6)  =  U49_AG(x3, x4, x5, x6)
U50_AG(x1, x2, x3, x4, x5)  =  U50_AG(x3, x4, x5)
U51_AG(x1, x2, x3, x4, x5)  =  U51_AG(x4, x5)
U52_AG(x1, x2, x3, x4, x5, x6)  =  U52_AG(x3, x4, x5, x6)
U53_AG(x1, x2, x3, x4, x5)  =  U53_AG(x3, x4, x5)
U54_AG(x1, x2, x3, x4, x5, x6)  =  U54_AG(x5, x6)
U55_AG(x1, x2, x3, x4, x5, x6, x7)  =  U55_AG(x3, x5, x6, x7)
U56_AG(x1, x2, x3, x4, x5, x6)  =  U56_AG(x3, x5, x6)
U57_AG(x1, x2, x3, x4, x5, x6)  =  U57_AG(x5, x6)
U58_AG(x1, x2, x3, x4, x5, x6, x7)  =  U58_AG(x3, x5, x6, x7)
U59_AG(x1, x2, x3, x4, x5, x6, x7)  =  U59_AG(x3, x5, x7)
U60_AG(x1, x2, x3, x4, x5, x6)  =  U60_AG(x3, x5, x6)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)
U16_AAAG(x1, x2, x3, x4, x5)  =  U16_AAAG(x4, x5)

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

(72) Obligation:

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

MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → U17_AG(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
MERGESORT1_IN_AG(.(T29, .(T27, T28)), []) → SPLIT12_IN_AAAA(T27, T28, X41, X40)
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → U2_AAAA(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
SPLIT12_IN_AAAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_AAA(T44, X71, X70)
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → U1_AAA(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U18_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_AG(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
U18_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → MERGESORT25_IN_AGA(T34, T33, X12)
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → U15_AGA(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGA(T72, .(T73, T74), X126) → P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAA(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → U2_AGAA(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
SPLIT12_IN_AGAA(T42, T44, .(T42, X70), X71) → SPLIT16_IN_GAA(T44, X71, X70)
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → U1_GAA(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → U13_GA(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
U11_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAA(T106, T105, X126)
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAA(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)
MERGESORT1_IN_AG(.(T34, .(T27, T28)), []) → U20_AG(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → MERGESORT25_IN_AGA(T34, T33, T54)
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_AG(T34, T27, T28, mergesort38_in_ga(T55, X13))
U21_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → MERGESORT38_IN_GA(T55, X13)
U20_AG(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_AG(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_AG(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U23_AG(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → MERGESORT38_IN_GA(T55, T149)
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_AG(T34, T27, T28, merge72_in_aa(T150, T149))
U24_AG(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → MERGE72_IN_AA(T150, T149)
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → U26_AG(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
MERGESORT1_IN_AG(.(T196, .(T194, T195)), .(T176, [])) → SPLIT12_IN_AAAA(T194, T195, X292, X291)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U27_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_AG(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U27_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → MERGESORT25_IN_AGA(T201, T200, X263)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T176, [])) → U29_AG(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_AG(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U29_AG(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, T206)
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_AG(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U30_AG(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → MERGESORT38_IN_GA(T207, X264)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T225, [])) → U32_AG(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_AG(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
U32_AG(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, [])
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → U15_AGG(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
MERGESORT25_IN_AGG(T72, .(T73, T74), X126) → P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126)
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → U3_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
P34_IN_AAGAAAAG(T72, T73, T74, X122, X123, X124, X125, X126) → SPLIT12_IN_AGAA(T72, .(T73, T74), X122, X123)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U4_AAGAAAAG(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U6_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U7_AAGAAAAG(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
P34_IN_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U9_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U10_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
U11_AAGAAAAG(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → MERGE54_IN_AAG(T106, T105, X126)
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_AAG(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_AG(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
U33_AG(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → MERGESORT38_IN_GG(T207, .(T225, []))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → U13_GG(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
MERGESORT38_IN_GG(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAG(T99, T100, T101, X167, X168, X169, X170, X171)
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T235, [])) → U35_AG(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_AG(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U35_AG(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGG(T201, T200, .(T235, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_AG(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U36_AG(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → MERGESORT38_IN_GG(T207, [])
MERGESORT1_IN_AG(.(T201, .(T194, T195)), .(T261, [])) → U38_AG(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_AG(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U38_AG(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → MERGESORT25_IN_AGA(T201, T200, .(T261, T263))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_AG(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U39_AG(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → MERGESORT38_IN_GA(T207, .(T261, T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_AG(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U40_AG(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → MERGE72_IN_AA(.(T261, T263), T262)
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → U42_AG(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
MERGESORT1_IN_AG(.(T299, .(T297, T298)), T279) → SPLIT12_IN_AAAA(T297, T298, X404, X403)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U43_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_AG(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U43_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → MERGESORT25_IN_AGA(T304, T303, X375)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T279) → U45_AG(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_AG(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U45_AG(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, T311)
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_AG(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U46_AG(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → MERGESORT38_IN_GA(T312, X376)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T327) → U48_AG(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_AG(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U48_AG(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, [])
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_AG(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U49_AG(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → MERGESORT38_IN_GG(T312, T327)
MERGESORT1_IN_AG(.(T304, .(T297, T298)), T332) → U51_AG(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_AG(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U51_AG(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, T332)
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_AG(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U52_AG(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → MERGESORT38_IN_GG(T312, [])
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_AG(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → SPLIT12_IN_AAAA(T297, T298, T312, T303)
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U54_AG(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGG(T304, T303, .(T372, T373))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_AG(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U55_AG(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → MERGESORT38_IN_GG(T312, .(T372, []))
MERGESORT1_IN_AG(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_AG(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U57_AG(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → MERGESORT25_IN_AGA(T304, T303, .(T398, T400))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U58_AG(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → MERGESORT38_IN_GA(T312, .(T398, .(T398, T399)))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_AG(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
U59_AG(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → MERGE152_IN_AAAG(T398, T400, T399, T388)
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → U16_AAAG(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
MERGESORT1_IN_AG(x1, x2)  =  MERGESORT1_IN_AG(x2)
U17_AG(x1, x2, x3, x4)  =  U17_AG(x4)
SPLIT12_IN_AAAA(x1, x2, x3, x4)  =  SPLIT12_IN_AAAA
U2_AAAA(x1, x2, x3, x4, x5)  =  U2_AAAA(x5)
SPLIT16_IN_AAA(x1, x2, x3)  =  SPLIT16_IN_AAA
U1_AAA(x1, x2, x3, x4, x5)  =  U1_AAA(x5)
U18_AG(x1, x2, x3, x4)  =  U18_AG(x4)
U19_AG(x1, x2, x3, x4)  =  U19_AG(x3, x4)
MERGESORT25_IN_AGA(x1, x2, x3)  =  MERGESORT25_IN_AGA(x2)
U15_AGA(x1, x2, x3, x4, x5)  =  U15_AGA(x3, x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U3_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAA(x3, x9)
SPLIT12_IN_AGAA(x1, x2, x3, x4)  =  SPLIT12_IN_AGAA(x2)
U2_AGAA(x1, x2, x3, x4, x5)  =  U2_AGAA(x2, x5)
SPLIT16_IN_GAA(x1, x2, x3)  =  SPLIT16_IN_GAA(x1)
U1_GAA(x1, x2, x3, x4, x5)  =  U1_GAA(x2, x5)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x3, x9)
U5_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAA(x3, x4, x5, x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x3, x5)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x3, x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x3, x4, x5, x9)
U8_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAA(x3, x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x3, x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x3, x4, x5, x9)
U11_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAA(x3, x4, x5, x9)
U12_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAA(x3, x4, x5, x9)
MERGE54_IN_AAA(x1, x2, x3)  =  MERGE54_IN_AAA
U14_AAA(x1, x2, x3, x4, x5)  =  U14_AAA(x5)
U20_AG(x1, x2, x3, x4)  =  U20_AG(x4)
U21_AG(x1, x2, x3, x4, x5)  =  U21_AG(x3, x4, x5)
U22_AG(x1, x2, x3, x4)  =  U22_AG(x3, x4)
U23_AG(x1, x2, x3, x4, x5)  =  U23_AG(x3, x4, x5)
U24_AG(x1, x2, x3, x4, x5)  =  U24_AG(x3, x5)
U25_AG(x1, x2, x3, x4)  =  U25_AG(x3, x4)
MERGE72_IN_AA(x1, x2)  =  MERGE72_IN_AA
U26_AG(x1, x2, x3, x4, x5)  =  U26_AG(x5)
U27_AG(x1, x2, x3, x4, x5)  =  U27_AG(x5)
U28_AG(x1, x2, x3, x4, x5)  =  U28_AG(x3, x5)
U29_AG(x1, x2, x3, x4, x5)  =  U29_AG(x5)
U30_AG(x1, x2, x3, x4, x5, x6)  =  U30_AG(x3, x5, x6)
U31_AG(x1, x2, x3, x4, x5)  =  U31_AG(x3, x5)
U32_AG(x1, x2, x3, x4, x5)  =  U32_AG(x5)
U33_AG(x1, x2, x3, x4, x5, x6)  =  U33_AG(x3, x5, x6)
MERGESORT25_IN_AGG(x1, x2, x3)  =  MERGESORT25_IN_AGG(x2, x3)
U15_AGG(x1, x2, x3, x4, x5)  =  U15_AGG(x3, x4, x5)
P34_IN_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAG(x3, x8)
U3_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_AAGAAAAG(x3, x8, x9)
U4_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAG(x3, x8, x9)
U5_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_AAGAAAAG(x3, x4, x5, x8, x9)
U6_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAG(x3, x8, x9)
U7_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAG(x3, x4, x5, x8, x9)
U8_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_AAGAAAAG(x3, x4, x5, x8, x9)
U9_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAG(x3, x8, x9)
U10_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAG(x3, x4, x5, x8, x9)
U11_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_AAGAAAAG(x3, x4, x5, x8, x9)
U12_AAGAAAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_AAGAAAAG(x3, x4, x5, x8, x9)
MERGE54_IN_AAG(x1, x2, x3)  =  MERGE54_IN_AAG(x3)
U14_AAG(x1, x2, x3, x4, x5)  =  U14_AAG(x4, x5)
U34_AG(x1, x2, x3, x4, x5)  =  U34_AG(x3, x5)
MERGESORT38_IN_GG(x1, x2)  =  MERGESORT38_IN_GG(x1, x2)
U13_GG(x1, x2, x3, x4, x5)  =  U13_GG(x3, x4, x5)
U35_AG(x1, x2, x3, x4, x5)  =  U35_AG(x5)
U36_AG(x1, x2, x3, x4, x5, x6)  =  U36_AG(x3, x5, x6)
U37_AG(x1, x2, x3, x4, x5)  =  U37_AG(x3, x5)
U38_AG(x1, x2, x3, x4, x5)  =  U38_AG(x5)
U39_AG(x1, x2, x3, x4, x5, x6)  =  U39_AG(x3, x5, x6)
U40_AG(x1, x2, x3, x4, x5, x6)  =  U40_AG(x3, x6)
U41_AG(x1, x2, x3, x4, x5)  =  U41_AG(x3, x5)
U42_AG(x1, x2, x3, x4, x5)  =  U42_AG(x4, x5)
U43_AG(x1, x2, x3, x4, x5)  =  U43_AG(x4, x5)
U44_AG(x1, x2, x3, x4, x5)  =  U44_AG(x3, x4, x5)
U45_AG(x1, x2, x3, x4, x5)  =  U45_AG(x4, x5)
U46_AG(x1, x2, x3, x4, x5, x6)  =  U46_AG(x3, x4, x5, x6)
U47_AG(x1, x2, x3, x4, x5)  =  U47_AG(x3, x4, x5)
U48_AG(x1, x2, x3, x4, x5)  =  U48_AG(x4, x5)
U49_AG(x1, x2, x3, x4, x5, x6)  =  U49_AG(x3, x4, x5, x6)
U50_AG(x1, x2, x3, x4, x5)  =  U50_AG(x3, x4, x5)
U51_AG(x1, x2, x3, x4, x5)  =  U51_AG(x4, x5)
U52_AG(x1, x2, x3, x4, x5, x6)  =  U52_AG(x3, x4, x5, x6)
U53_AG(x1, x2, x3, x4, x5)  =  U53_AG(x3, x4, x5)
U54_AG(x1, x2, x3, x4, x5, x6)  =  U54_AG(x5, x6)
U55_AG(x1, x2, x3, x4, x5, x6, x7)  =  U55_AG(x3, x5, x6, x7)
U56_AG(x1, x2, x3, x4, x5, x6)  =  U56_AG(x3, x5, x6)
U57_AG(x1, x2, x3, x4, x5, x6)  =  U57_AG(x5, x6)
U58_AG(x1, x2, x3, x4, x5, x6, x7)  =  U58_AG(x3, x5, x6, x7)
U59_AG(x1, x2, x3, x4, x5, x6, x7)  =  U59_AG(x3, x5, x7)
U60_AG(x1, x2, x3, x4, x5, x6)  =  U60_AG(x3, x5, x6)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)
U16_AAAG(x1, x2, x3, x4, x5)  =  U16_AAAG(x4, x5)

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

(73) DependencyGraphProof (EQUIVALENT transformation)

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

(74) Complex Obligation (AND)

(75) Obligation:

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

MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)

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

(76) UsableRulesProof (EQUIVALENT transformation)

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

(77) Obligation:

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

MERGE152_IN_AAAG(T439, T441, .(T439, T440), .(T439, T429)) → MERGE152_IN_AAAG(T439, T441, T440, T429)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
MERGE152_IN_AAAG(x1, x2, x3, x4)  =  MERGE152_IN_AAAG(x4)

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

(78) PiDPToQDPProof (SOUND transformation)

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

(79) Obligation:

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

MERGE152_IN_AAAG(.(T429)) → MERGE152_IN_AAAG(T429)

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

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

  • MERGE152_IN_AAAG(.(T429)) → MERGE152_IN_AAAG(T429)
    The graph contains the following edges 1 > 1

(81) YES

(82) Obligation:

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

MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
MERGE54_IN_AAG(x1, x2, x3)  =  MERGE54_IN_AAG(x3)

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

(83) UsableRulesProof (EQUIVALENT transformation)

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

(84) Obligation:

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

MERGE54_IN_AAG(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAG(.(T143, T144), T142, X213)

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

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

(85) PiDPToQDPProof (SOUND transformation)

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

(86) Obligation:

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

MERGE54_IN_AAG(.(X213)) → MERGE54_IN_AAG(X213)

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

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

  • MERGE54_IN_AAG(.(X213)) → MERGE54_IN_AAG(X213)
    The graph contains the following edges 1 > 1

(88) YES

(89) Obligation:

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

MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
MERGE54_IN_AAA(x1, x2, x3)  =  MERGE54_IN_AAA

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

(90) UsableRulesProof (EQUIVALENT transformation)

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

(91) Obligation:

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

MERGE54_IN_AAA(.(T143, T144), .(T143, T142), .(T143, X213)) → MERGE54_IN_AAA(.(T143, T144), T142, X213)

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

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

(92) PiDPToQDPProof (SOUND transformation)

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

(93) Obligation:

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

MERGE54_IN_AAAMERGE54_IN_AAA

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

(94) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = MERGE54_IN_AAA evaluates to t =MERGE54_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from MERGE54_IN_AAA to MERGE54_IN_AAA.



(95) NO

(96) Obligation:

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

SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
SPLIT16_IN_GAA(x1, x2, x3)  =  SPLIT16_IN_GAA(x1)

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

(97) UsableRulesProof (EQUIVALENT transformation)

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

(98) Obligation:

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

SPLIT16_IN_GAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_GAA(T51, X89, X88)

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

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

(99) PiDPToQDPProof (SOUND transformation)

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

(100) Obligation:

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

SPLIT16_IN_GAA(.(T51)) → SPLIT16_IN_GAA(T51)

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

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

  • SPLIT16_IN_GAA(.(T51)) → SPLIT16_IN_GAA(T51)
    The graph contains the following edges 1 > 1

(102) YES

(103) Obligation:

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

P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x3, x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x3, x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x3, x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x3, x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x3, x4, x5, x9)

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

(104) UsableRulesProof (EQUIVALENT transformation)

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

(105) Obligation:

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

P34_IN_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126) → U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_AAGAAAAA(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → MERGESORT38_IN_GA(T78, X124)
MERGESORT38_IN_GA(.(T99, .(T100, T101)), X171) → P34_IN_AAGAAAAA(T99, T100, T101, X167, X168, X169, X170, X171)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126) → U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → MERGESORT38_IN_GA(T84, X125)
U6_AAGAAAAA(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T83)
P34_IN_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126) → U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → MERGESORT38_IN_GA(T84, T105)
U9_AAGAAAAA(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → MERGESORT38_IN_GA(T78, T106)

The TRS R consists of the following rules:

split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
P34_IN_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8)  =  P34_IN_AAGAAAAA(x3)
U4_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_AAGAAAAA(x3, x9)
MERGESORT38_IN_GA(x1, x2)  =  MERGESORT38_IN_GA(x1)
U6_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_AAGAAAAA(x3, x9)
U7_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_AAGAAAAA(x3, x4, x5, x9)
U9_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_AAGAAAAA(x3, x9)
U10_AAGAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_AAGAAAAA(x3, x4, x5, x9)

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

(106) PiDPToQDPProof (SOUND transformation)

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

(107) Obligation:

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

P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, split12_in_agaa(.(T74)))
U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, split12_in_agaa(.(T74)))
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, split12_in_agaa(.(T74)))
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(108) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, split12_in_agaa(.(T74))) at position [1] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))

(109) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, split12_in_agaa(.(T74)))
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, split12_in_agaa(.(T74)))
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(110) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, split12_in_agaa(.(T74))) at position [1] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))

(111) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, split12_in_agaa(.(T74)))
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(112) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, split12_in_agaa(.(T74))) at position [1] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))

(113) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(114) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74)))) at position [1,1] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

(115) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(116) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74)))) at position [1,1] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

(117) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74))))
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(118) Rewriting (EQUIVALENT transformation)

By rewriting [LPAR04] the rule P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), split16_in_gaa(.(T74)))) at position [1,1] we obtained the following new rules [LPAR04]:

P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

(119) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(120) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MERGESORT38_IN_GA(.(.(T101))) → P34_IN_AAGAAAAA(T101)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

POL(U4_AAGAAAAA(x1, x2)) = 0 +
[0,0]
·x1 +
[0,1]
·x2

POL(split12_out_agaa(x1, x2, x3)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\10/
·x2 +
/00\
\10/
·x3

POL(.(x1)) =
/0\
\1/
+
/01\
\01/
·x1

POL(MERGESORT38_IN_GA(x1)) = 0 +
[1,0]
·x1

POL(P34_IN_AAGAAAAA(x1)) = 0 +
[0,1]
·x1

POL(U6_AAGAAAAA(x1, x2)) = 0 +
[0,0]
·x1 +
[0,1]
·x2

POL(U7_AAGAAAAA(x1, x2, x3, x4)) = 0 +
[0,0]
·x1 +
[0,0]
·x2 +
[1,0]
·x3 +
[0,0]
·x4

POL(mergesort38_in_ga(x1)) =
/0\
\0/
+
/00\
\00/
·x1

POL(mergesort38_out_ga(x1)) =
/1\
\1/
+
/00\
\01/
·x1

POL(U9_AAGAAAAA(x1, x2)) = 0 +
[0,0]
·x1 +
[0,1]
·x2

POL(U10_AAGAAAAA(x1, x2, x3, x4)) = 0 +
[0,0]
·x1 +
[1,0]
·x2 +
[1,0]
·x3 +
[0,0]
·x4

POL(U2_agaa(x1, x2)) =
/0\
\0/
+
/10\
\00/
·x1 +
/00\
\01/
·x2

POL(U1_gaa(x1, x2)) =
/1\
\0/
+
/00\
\00/
·x1 +
/10\
\10/
·x2

POL(split16_in_gaa(x1)) =
/0\
\0/
+
/01\
\11/
·x1

POL([]) =
/0\
\0/

POL(U13_ga(x1, x2)) =
/0\
\1/
+
/01\
\10/
·x1 +
/00\
\00/
·x2

POL(p34_in_aagaaaaa(x1)) =
/0\
\0/
+
/00\
\00/
·x1

POL(split16_out_gaa(x1, x2, x3)) =
/0\
\0/
+
/00\
\00/
·x1 +
/01\
\10/
·x2 +
/01\
\01/
·x3

POL(U4_aagaaaaa(x1, x2)) =
/1\
\1/
+
/01\
\11/
·x1 +
/00\
\00/
·x2

POL(split12_in_agaa(x1)) =
/1\
\1/
+
/00\
\00/
·x1

POL(U5_aagaaaaa(x1, x2, x3, x4)) =
/0\
\0/
+
/00\
\00/
·x1 +
/01\
\01/
·x2 +
/11\
\10/
·x3 +
/01\
\00/
·x4

POL(p34_out_aagaaaaa(x1, x2, x3)) =
/0\
\1/
+
/11\
\11/
·x1 +
/11\
\10/
·x2 +
/11\
\10/
·x3

POL(U3_aagaaaaa(x1, x2)) =
/0\
\0/
+
/00\
\10/
·x1 +
/00\
\00/
·x2

POL(U6_aagaaaaa(x1, x2)) =
/0\
\1/
+
/10\
\00/
·x1 +
/00\
\00/
·x2

POL(U7_aagaaaaa(x1, x2, x3, x4)) =
/1\
\0/
+
/11\
\00/
·x1 +
/00\
\10/
·x2 +
/11\
\00/
·x3 +
/00\
\00/
·x4

POL(U8_aagaaaaa(x1, x2, x3, x4)) =
/0\
\1/
+
/00\
\00/
·x1 +
/01\
\00/
·x2 +
/00\
\01/
·x3 +
/00\
\01/
·x4

POL(U9_aagaaaaa(x1, x2)) =
/0\
\0/
+
/11\
\11/
·x1 +
/00\
\00/
·x2

POL(U10_aagaaaaa(x1, x2, x3, x4)) =
/1\
\0/
+
/00\
\10/
·x1 +
/10\
\00/
·x2 +
/00\
\00/
·x3 +
/00\
\11/
·x4

POL(U11_aagaaaaa(x1, x2, x3, x4)) =
/0\
\0/
+
/01\
\00/
·x1 +
/00\
\00/
·x2 +
/00\
\10/
·x3 +
/00\
\00/
·x4

POL(U12_aagaaaaa(x1, x2, x3, x4)) =
/0\
\0/
+
/00\
\00/
·x1 +
/00\
\01/
·x2 +
/00\
\01/
·x3 +
/00\
\00/
·x4

POL(merge54_in_aaa) =
/1\
\1/

POL(merge54_out_aaa) =
/0\
\0/

POL(U14_aaa(x1)) =
/0\
\0/
+
/11\
\00/
·x1

The following usable rules [FROCOS05] were oriented:

split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)

(121) Obligation:

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

U4_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T79)) → MERGESORT38_IN_GA(T78)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U7_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U7_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U6_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → U10_AAGAAAAA(T74, T78, T84, mergesort38_in_ga(T78))
U10_AAGAAAAA(T74, T78, T84, mergesort38_out_ga(T78)) → MERGESORT38_IN_GA(T84)
U9_AAGAAAAA(T74, split12_out_agaa(.(T74), T78, T84)) → MERGESORT38_IN_GA(T78)
P34_IN_AAGAAAAA(T74) → U4_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U6_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))
P34_IN_AAGAAAAA(T74) → U9_AAGAAAAA(T74, U2_agaa(.(T74), U1_gaa(T74, split16_in_gaa(T74))))

The TRS R consists of the following rules:

split12_in_agaa(T44) → U2_agaa(T44, split16_in_gaa(T44))
mergesort38_in_ga([]) → mergesort38_out_ga([])
mergesort38_in_ga(.([])) → mergesort38_out_ga(.([]))
mergesort38_in_ga(.(.(T101))) → U13_ga(T101, p34_in_aagaaaaa(T101))
U2_agaa(T44, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T44, .(X70), X71)
U13_ga(T101, p34_out_aagaaaaa(T101, X167, X168)) → mergesort38_out_ga(.(.(T101)))
split16_in_gaa([]) → split16_out_gaa([], [], [])
split16_in_gaa(.(T51)) → U1_gaa(T51, split16_in_gaa(T51))
p34_in_aagaaaaa(T74) → U3_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U4_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U6_aagaaaaa(T74, split12_in_agaa(.(T74)))
p34_in_aagaaaaa(T74) → U9_aagaaaaa(T74, split12_in_agaa(.(T74)))
U1_gaa(T51, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T51), .(X88), X89)
U3_aagaaaaa(T74, split12_out_agaa(.(T74), X122, X123)) → p34_out_aagaaaaa(T74, X122, X123)
U4_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T79)) → U5_aagaaaaa(T74, T78, T79, mergesort38_in_ga(T78))
U6_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U7_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U9_aagaaaaa(T74, split12_out_agaa(.(T74), T78, T84)) → U10_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T78))
U5_aagaaaaa(T74, T78, T79, mergesort38_out_ga(T78)) → p34_out_aagaaaaa(T74, T78, T79)
U7_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U8_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U10_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T78)) → U11_aagaaaaa(T74, T78, T84, mergesort38_in_ga(T84))
U8_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → p34_out_aagaaaaa(T74, T78, T84)
U11_aagaaaaa(T74, T78, T84, mergesort38_out_ga(T84)) → U12_aagaaaaa(T74, T78, T84, merge54_in_aaa)
U12_aagaaaaa(T74, T78, T84, merge54_out_aaa) → p34_out_aagaaaaa(T74, T78, T84)
merge54_in_aaamerge54_out_aaa
merge54_in_aaaU14_aaa(merge54_in_aaa)
U14_aaa(merge54_out_aaa) → merge54_out_aaa

The set Q consists of the following terms:

split12_in_agaa(x0)
mergesort38_in_ga(x0)
U2_agaa(x0, x1)
U13_ga(x0, x1)
split16_in_gaa(x0)
p34_in_aagaaaaa(x0)
U1_gaa(x0, x1)
U3_aagaaaaa(x0, x1)
U4_aagaaaaa(x0, x1)
U6_aagaaaaa(x0, x1)
U9_aagaaaaa(x0, x1)
U5_aagaaaaa(x0, x1, x2, x3)
U7_aagaaaaa(x0, x1, x2, x3)
U10_aagaaaaa(x0, x1, x2, x3)
U8_aagaaaaa(x0, x1, x2, x3)
U11_aagaaaaa(x0, x1, x2, x3)
U12_aagaaaaa(x0, x1, x2, x3)
merge54_in_aaa
U14_aaa(x0)

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

(122) DependencyGraphProof (EQUIVALENT transformation)

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

(123) TRUE

(124) Obligation:

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

SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)

The TRS R consists of the following rules:

mergesort1_in_ag([], []) → mergesort1_out_ag([], [])
mergesort1_in_ag(.(T29, .(T27, T28)), []) → U17_ag(T29, T27, T28, split12_in_aaaa(T27, T28, X41, X40))
split12_in_aaaa(T42, T44, .(T42, X70), X71) → U2_aaaa(T42, T44, X70, X71, split16_in_aaa(T44, X71, X70))
split16_in_aaa([], [], []) → split16_out_aaa([], [], [])
split16_in_aaa(.(T49, T51), .(T49, X88), X89) → U1_aaa(T49, T51, X88, X89, split16_in_aaa(T51, X89, X88))
U1_aaa(T49, T51, X88, X89, split16_out_aaa(T51, X89, X88)) → split16_out_aaa(.(T49, T51), .(T49, X88), X89)
U2_aaaa(T42, T44, X70, X71, split16_out_aaa(T44, X71, X70)) → split12_out_aaaa(T42, T44, .(T42, X70), X71)
U17_ag(T29, T27, T28, split12_out_aaaa(T27, T28, X41, X40)) → mergesort1_out_ag(.(T29, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U18_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T32, T33))
U18_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T32, T33)) → U19_ag(T34, T27, T28, mergesort25_in_aga(T34, T33, X12))
mergesort25_in_aga(T62, [], .(T62, [])) → mergesort25_out_aga(T62, [], .(T62, []))
mergesort25_in_aga(T72, .(T73, T74), X126) → U15_aga(T72, T73, T74, X126, p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
split12_in_agaa(T42, T44, .(T42, X70), X71) → U2_agaa(T42, T44, X70, X71, split16_in_gaa(T44, X71, X70))
split16_in_gaa([], [], []) → split16_out_gaa([], [], [])
split16_in_gaa(.(T49, T51), .(T49, X88), X89) → U1_gaa(T49, T51, X88, X89, split16_in_gaa(T51, X89, X88))
U1_gaa(T49, T51, X88, X89, split16_out_gaa(T51, X89, X88)) → split16_out_gaa(.(T49, T51), .(T49, X88), X89)
U2_agaa(T42, T44, X70, X71, split16_out_gaa(T44, X71, X70)) → split12_out_agaa(T42, T44, .(T42, X70), X71)
U3_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
mergesort38_in_ga([], []) → mergesort38_out_ga([], [])
mergesort38_in_ga(.(T89, []), .(T89, [])) → mergesort38_out_ga(.(T89, []), .(T89, []))
mergesort38_in_ga(.(T99, .(T100, T101)), X171) → U13_ga(T99, T100, T101, X171, p34_in_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171))
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aaa(T106, T105, X126))
merge54_in_aaa([], T113, T113) → merge54_out_aaa([], T113, T113)
merge54_in_aaa(T118, [], T118) → merge54_out_aaa(T118, [], T118)
merge54_in_aaa(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aaa(T143, T144, T142, X213, merge54_in_aaa(.(T143, T144), T142, X213))
U14_aaa(T143, T144, T142, X213, merge54_out_aaa(.(T143, T144), T142, X213)) → merge54_out_aaa(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aaa(T106, T105, X126)) → p34_out_aagaaaaa(T72, T73, T74, T78, T84, T106, T105, X126)
U13_ga(T99, T100, T101, X171, p34_out_aagaaaaa(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_ga(.(T99, .(T100, T101)), X171)
U5_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaaa(T72, T73, T74, T78, T79, X124, X125, X126)
U15_aga(T72, T73, T74, X126, p34_out_aagaaaaa(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_aga(T72, .(T73, T74), X126)
U19_ag(T34, T27, T28, mergesort25_out_aga(T34, T33, X12)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T34, .(T27, T28)), []) → U20_ag(T34, T27, T28, split12_in_aaaa(T27, T28, T55, T33))
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U21_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T54))
U21_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T54)) → U22_ag(T34, T27, T28, mergesort38_in_ga(T55, X13))
U22_ag(T34, T27, T28, mergesort38_out_ga(T55, X13)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
U20_ag(T34, T27, T28, split12_out_aaaa(T27, T28, T55, T33)) → U23_ag(T34, T27, T28, T55, mergesort25_in_aga(T34, T33, T150))
U23_ag(T34, T27, T28, T55, mergesort25_out_aga(T34, T33, T150)) → U24_ag(T34, T27, T28, T150, mergesort38_in_ga(T55, T149))
U24_ag(T34, T27, T28, T150, mergesort38_out_ga(T55, T149)) → U25_ag(T34, T27, T28, merge72_in_aa(T150, T149))
merge72_in_aa([], []) → merge72_out_aa([], [])
U25_ag(T34, T27, T28, merge72_out_aa(T150, T149)) → mergesort1_out_ag(.(T34, .(T27, T28)), [])
mergesort1_in_ag(.(T168, []), .(T168, [])) → mergesort1_out_ag(.(T168, []), .(T168, []))
mergesort1_in_ag(.(T196, .(T194, T195)), .(T176, [])) → U26_ag(T196, T194, T195, T176, split12_in_aaaa(T194, T195, X292, X291))
U26_ag(T196, T194, T195, T176, split12_out_aaaa(T194, T195, X292, X291)) → mergesort1_out_ag(.(T196, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U27_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T199, T200))
U27_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T199, T200)) → U28_ag(T201, T194, T195, T176, mergesort25_in_aga(T201, T200, X263))
U28_ag(T201, T194, T195, T176, mergesort25_out_aga(T201, T200, X263)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T176, [])) → U29_ag(T201, T194, T195, T176, split12_in_aaaa(T194, T195, T207, T200))
U29_ag(T201, T194, T195, T176, split12_out_aaaa(T194, T195, T207, T200)) → U30_ag(T201, T194, T195, T176, T207, mergesort25_in_aga(T201, T200, T206))
U30_ag(T201, T194, T195, T176, T207, mergesort25_out_aga(T201, T200, T206)) → U31_ag(T201, T194, T195, T176, mergesort38_in_ga(T207, X264))
U31_ag(T201, T194, T195, T176, mergesort38_out_ga(T207, X264)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T176, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T225, [])) → U32_ag(T201, T194, T195, T225, split12_in_aaaa(T194, T195, T207, T200))
U32_ag(T201, T194, T195, T225, split12_out_aaaa(T194, T195, T207, T200)) → U33_ag(T201, T194, T195, T225, T207, mergesort25_in_agg(T201, T200, []))
mergesort25_in_agg(T62, [], .(T62, [])) → mergesort25_out_agg(T62, [], .(T62, []))
mergesort25_in_agg(T72, .(T73, T74), X126) → U15_agg(T72, T73, T74, X126, p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126))
p34_in_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126) → U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), X122, X123))
U3_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), X122, X123)) → p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126) → U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T79))
U4_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T79)) → U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_in_ga(T78, X124))
U5_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126, mergesort38_out_ga(T78, X124)) → p34_out_aagaaaag(T72, T73, T74, T78, T79, X124, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126) → U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U6_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T78, T83))
U7_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T78, T83)) → U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_in_ga(T84, X125))
U8_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126, mergesort38_out_ga(T84, X125)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T83, X125, X126)
p34_in_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126) → U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_in_agaa(T72, .(T73, T74), T78, T84))
U9_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, split12_out_agaa(T72, .(T73, T74), T78, T84)) → U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T78, T106))
U10_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T78, T106)) → U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_in_ga(T84, T105))
U11_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, mergesort38_out_ga(T84, T105)) → U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_in_aag(T106, T105, X126))
merge54_in_aag([], T113, T113) → merge54_out_aag([], T113, T113)
merge54_in_aag(T118, [], T118) → merge54_out_aag(T118, [], T118)
merge54_in_aag(.(T143, T144), .(T143, T142), .(T143, X213)) → U14_aag(T143, T144, T142, X213, merge54_in_aag(.(T143, T144), T142, X213))
U14_aag(T143, T144, T142, X213, merge54_out_aag(.(T143, T144), T142, X213)) → merge54_out_aag(.(T143, T144), .(T143, T142), .(T143, X213))
U12_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126, merge54_out_aag(T106, T105, X126)) → p34_out_aagaaaag(T72, T73, T74, T78, T84, T106, T105, X126)
U15_agg(T72, T73, T74, X126, p34_out_aagaaaag(T72, T73, T74, X122, X123, X124, X125, X126)) → mergesort25_out_agg(T72, .(T73, T74), X126)
U33_ag(T201, T194, T195, T225, T207, mergesort25_out_agg(T201, T200, [])) → U34_ag(T201, T194, T195, T225, mergesort38_in_gg(T207, .(T225, [])))
mergesort38_in_gg([], []) → mergesort38_out_gg([], [])
mergesort38_in_gg(.(T89, []), .(T89, [])) → mergesort38_out_gg(.(T89, []), .(T89, []))
mergesort38_in_gg(.(T99, .(T100, T101)), X171) → U13_gg(T99, T100, T101, X171, p34_in_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171))
U13_gg(T99, T100, T101, X171, p34_out_aagaaaag(T99, T100, T101, X167, X168, X169, X170, X171)) → mergesort38_out_gg(.(T99, .(T100, T101)), X171)
U34_ag(T201, T194, T195, T225, mergesort38_out_gg(T207, .(T225, []))) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T225, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T235, [])) → U35_ag(T201, T194, T195, T235, split12_in_aaaa(T194, T195, T207, T200))
U35_ag(T201, T194, T195, T235, split12_out_aaaa(T194, T195, T207, T200)) → U36_ag(T201, T194, T195, T235, T207, mergesort25_in_agg(T201, T200, .(T235, [])))
U36_ag(T201, T194, T195, T235, T207, mergesort25_out_agg(T201, T200, .(T235, []))) → U37_ag(T201, T194, T195, T235, mergesort38_in_gg(T207, []))
U37_ag(T201, T194, T195, T235, mergesort38_out_gg(T207, [])) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T235, []))
mergesort1_in_ag(.(T201, .(T194, T195)), .(T261, [])) → U38_ag(T201, T194, T195, T261, split12_in_aaaa(T194, T195, T207, T200))
U38_ag(T201, T194, T195, T261, split12_out_aaaa(T194, T195, T207, T200)) → U39_ag(T201, T194, T195, T261, T207, mergesort25_in_aga(T201, T200, .(T261, T263)))
U39_ag(T201, T194, T195, T261, T207, mergesort25_out_aga(T201, T200, .(T261, T263))) → U40_ag(T201, T194, T195, T261, T263, mergesort38_in_ga(T207, .(T261, T262)))
U40_ag(T201, T194, T195, T261, T263, mergesort38_out_ga(T207, .(T261, T262))) → U41_ag(T201, T194, T195, T261, merge72_in_aa(.(T261, T263), T262))
U41_ag(T201, T194, T195, T261, merge72_out_aa(.(T261, T263), T262)) → mergesort1_out_ag(.(T201, .(T194, T195)), .(T261, []))
mergesort1_in_ag(.(T299, .(T297, T298)), T279) → U42_ag(T299, T297, T298, T279, split12_in_aaaa(T297, T298, X404, X403))
U42_ag(T299, T297, T298, T279, split12_out_aaaa(T297, T298, X404, X403)) → mergesort1_out_ag(.(T299, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U43_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T302, T303))
U43_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T302, T303)) → U44_ag(T304, T297, T298, T279, mergesort25_in_aga(T304, T303, X375))
U44_ag(T304, T297, T298, T279, mergesort25_out_aga(T304, T303, X375)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T279) → U45_ag(T304, T297, T298, T279, split12_in_aaaa(T297, T298, T312, T303))
U45_ag(T304, T297, T298, T279, split12_out_aaaa(T297, T298, T312, T303)) → U46_ag(T304, T297, T298, T279, T312, mergesort25_in_aga(T304, T303, T311))
U46_ag(T304, T297, T298, T279, T312, mergesort25_out_aga(T304, T303, T311)) → U47_ag(T304, T297, T298, T279, mergesort38_in_ga(T312, X376))
U47_ag(T304, T297, T298, T279, mergesort38_out_ga(T312, X376)) → mergesort1_out_ag(.(T304, .(T297, T298)), T279)
mergesort1_in_ag(.(T304, .(T297, T298)), T327) → U48_ag(T304, T297, T298, T327, split12_in_aaaa(T297, T298, T312, T303))
U48_ag(T304, T297, T298, T327, split12_out_aaaa(T297, T298, T312, T303)) → U49_ag(T304, T297, T298, T327, T312, mergesort25_in_agg(T304, T303, []))
U49_ag(T304, T297, T298, T327, T312, mergesort25_out_agg(T304, T303, [])) → U50_ag(T304, T297, T298, T327, mergesort38_in_gg(T312, T327))
U50_ag(T304, T297, T298, T327, mergesort38_out_gg(T312, T327)) → mergesort1_out_ag(.(T304, .(T297, T298)), T327)
mergesort1_in_ag(.(T304, .(T297, T298)), T332) → U51_ag(T304, T297, T298, T332, split12_in_aaaa(T297, T298, T312, T303))
U51_ag(T304, T297, T298, T332, split12_out_aaaa(T297, T298, T312, T303)) → U52_ag(T304, T297, T298, T332, T312, mergesort25_in_agg(T304, T303, T332))
U52_ag(T304, T297, T298, T332, T312, mergesort25_out_agg(T304, T303, T332)) → U53_ag(T304, T297, T298, T332, mergesort38_in_gg(T312, []))
U53_ag(T304, T297, T298, T332, mergesort38_out_gg(T312, [])) → mergesort1_out_ag(.(T304, .(T297, T298)), T332)
mergesort1_in_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373))) → U54_ag(T304, T297, T298, T372, T373, split12_in_aaaa(T297, T298, T312, T303))
U54_ag(T304, T297, T298, T372, T373, split12_out_aaaa(T297, T298, T312, T303)) → U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_in_agg(T304, T303, .(T372, T373)))
U55_ag(T304, T297, T298, T372, T373, T312, mergesort25_out_agg(T304, T303, .(T372, T373))) → U56_ag(T304, T297, T298, T372, T373, mergesort38_in_gg(T312, .(T372, [])))
U56_ag(T304, T297, T298, T372, T373, mergesort38_out_gg(T312, .(T372, []))) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T372, .(T372, T373)))
mergesort1_in_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388))) → U57_ag(T304, T297, T298, T398, T388, split12_in_aaaa(T297, T298, T312, T303))
U57_ag(T304, T297, T298, T398, T388, split12_out_aaaa(T297, T298, T312, T303)) → U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_in_aga(T304, T303, .(T398, T400)))
U58_ag(T304, T297, T298, T398, T388, T312, mergesort25_out_aga(T304, T303, .(T398, T400))) → U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_in_ga(T312, .(T398, .(T398, T399))))
U59_ag(T304, T297, T298, T398, T388, T400, mergesort38_out_ga(T312, .(T398, .(T398, T399)))) → U60_ag(T304, T297, T298, T398, T388, merge152_in_aaag(T398, T400, T399, T388))
merge152_in_aaag(T413, T414, [], .(T413, T414)) → merge152_out_aaag(T413, T414, [], .(T413, T414))
merge152_in_aaag(T439, T441, .(T439, T440), .(T439, T429)) → U16_aaag(T439, T441, T440, T429, merge152_in_aaag(T439, T441, T440, T429))
U16_aaag(T439, T441, T440, T429, merge152_out_aaag(T439, T441, T440, T429)) → merge152_out_aaag(T439, T441, .(T439, T440), .(T439, T429))
U60_ag(T304, T297, T298, T398, T388, merge152_out_aaag(T398, T400, T399, T388)) → mergesort1_out_ag(.(T304, .(T297, T298)), .(T398, .(T398, T388)))

The argument filtering Pi contains the following mapping:
mergesort1_in_ag(x1, x2)  =  mergesort1_in_ag(x2)
[]  =  []
mergesort1_out_ag(x1, x2)  =  mergesort1_out_ag(x1, x2)
U17_ag(x1, x2, x3, x4)  =  U17_ag(x4)
split12_in_aaaa(x1, x2, x3, x4)  =  split12_in_aaaa
U2_aaaa(x1, x2, x3, x4, x5)  =  U2_aaaa(x5)
split16_in_aaa(x1, x2, x3)  =  split16_in_aaa
split16_out_aaa(x1, x2, x3)  =  split16_out_aaa(x1, x2, x3)
U1_aaa(x1, x2, x3, x4, x5)  =  U1_aaa(x5)
.(x1, x2)  =  .(x2)
split12_out_aaaa(x1, x2, x3, x4)  =  split12_out_aaaa(x2, x3, x4)
U18_ag(x1, x2, x3, x4)  =  U18_ag(x4)
U19_ag(x1, x2, x3, x4)  =  U19_ag(x3, x4)
mergesort25_in_aga(x1, x2, x3)  =  mergesort25_in_aga(x2)
mergesort25_out_aga(x1, x2, x3)  =  mergesort25_out_aga(x2)
U15_aga(x1, x2, x3, x4, x5)  =  U15_aga(x3, x5)
p34_in_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaaa(x3)
U3_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaaa(x3, x9)
split12_in_agaa(x1, x2, x3, x4)  =  split12_in_agaa(x2)
U2_agaa(x1, x2, x3, x4, x5)  =  U2_agaa(x2, x5)
split16_in_gaa(x1, x2, x3)  =  split16_in_gaa(x1)
split16_out_gaa(x1, x2, x3)  =  split16_out_gaa(x1, x2, x3)
U1_gaa(x1, x2, x3, x4, x5)  =  U1_gaa(x2, x5)
split12_out_agaa(x1, x2, x3, x4)  =  split12_out_agaa(x2, x3, x4)
p34_out_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaaa(x3, x4, x5)
U4_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaaa(x3, x9)
U5_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaaa(x3, x4, x5, x9)
mergesort38_in_ga(x1, x2)  =  mergesort38_in_ga(x1)
mergesort38_out_ga(x1, x2)  =  mergesort38_out_ga(x1)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x3, x5)
U6_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaaa(x3, x9)
U7_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaaa(x3, x4, x5, x9)
U8_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaaa(x3, x4, x5, x9)
U9_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaaa(x3, x9)
U10_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaaa(x3, x4, x5, x9)
U11_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaaa(x3, x4, x5, x9)
U12_aagaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaaa(x3, x4, x5, x9)
merge54_in_aaa(x1, x2, x3)  =  merge54_in_aaa
merge54_out_aaa(x1, x2, x3)  =  merge54_out_aaa
U14_aaa(x1, x2, x3, x4, x5)  =  U14_aaa(x5)
U20_ag(x1, x2, x3, x4)  =  U20_ag(x4)
U21_ag(x1, x2, x3, x4, x5)  =  U21_ag(x3, x4, x5)
U22_ag(x1, x2, x3, x4)  =  U22_ag(x3, x4)
U23_ag(x1, x2, x3, x4, x5)  =  U23_ag(x3, x4, x5)
U24_ag(x1, x2, x3, x4, x5)  =  U24_ag(x3, x5)
U25_ag(x1, x2, x3, x4)  =  U25_ag(x3, x4)
merge72_in_aa(x1, x2)  =  merge72_in_aa
merge72_out_aa(x1, x2)  =  merge72_out_aa(x1, x2)
U26_ag(x1, x2, x3, x4, x5)  =  U26_ag(x5)
U27_ag(x1, x2, x3, x4, x5)  =  U27_ag(x5)
U28_ag(x1, x2, x3, x4, x5)  =  U28_ag(x3, x5)
U29_ag(x1, x2, x3, x4, x5)  =  U29_ag(x5)
U30_ag(x1, x2, x3, x4, x5, x6)  =  U30_ag(x3, x5, x6)
U31_ag(x1, x2, x3, x4, x5)  =  U31_ag(x3, x5)
U32_ag(x1, x2, x3, x4, x5)  =  U32_ag(x5)
U33_ag(x1, x2, x3, x4, x5, x6)  =  U33_ag(x3, x5, x6)
mergesort25_in_agg(x1, x2, x3)  =  mergesort25_in_agg(x2, x3)
mergesort25_out_agg(x1, x2, x3)  =  mergesort25_out_agg(x2, x3)
U15_agg(x1, x2, x3, x4, x5)  =  U15_agg(x3, x4, x5)
p34_in_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_in_aagaaaag(x3, x8)
U3_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_aagaaaag(x3, x8, x9)
p34_out_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8)  =  p34_out_aagaaaag(x3, x4, x5, x8)
U4_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_aagaaaag(x3, x8, x9)
U5_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U5_aagaaaag(x3, x4, x5, x8, x9)
U6_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U6_aagaaaag(x3, x8, x9)
U7_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U7_aagaaaag(x3, x4, x5, x8, x9)
U8_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U8_aagaaaag(x3, x4, x5, x8, x9)
U9_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U9_aagaaaag(x3, x8, x9)
U10_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U10_aagaaaag(x3, x4, x5, x8, x9)
U11_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U11_aagaaaag(x3, x4, x5, x8, x9)
U12_aagaaaag(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U12_aagaaaag(x3, x4, x5, x8, x9)
merge54_in_aag(x1, x2, x3)  =  merge54_in_aag(x3)
merge54_out_aag(x1, x2, x3)  =  merge54_out_aag(x1, x2, x3)
U14_aag(x1, x2, x3, x4, x5)  =  U14_aag(x4, x5)
U34_ag(x1, x2, x3, x4, x5)  =  U34_ag(x3, x5)
mergesort38_in_gg(x1, x2)  =  mergesort38_in_gg(x1, x2)
mergesort38_out_gg(x1, x2)  =  mergesort38_out_gg(x1, x2)
U13_gg(x1, x2, x3, x4, x5)  =  U13_gg(x3, x4, x5)
U35_ag(x1, x2, x3, x4, x5)  =  U35_ag(x5)
U36_ag(x1, x2, x3, x4, x5, x6)  =  U36_ag(x3, x5, x6)
U37_ag(x1, x2, x3, x4, x5)  =  U37_ag(x3, x5)
U38_ag(x1, x2, x3, x4, x5)  =  U38_ag(x5)
U39_ag(x1, x2, x3, x4, x5, x6)  =  U39_ag(x3, x5, x6)
U40_ag(x1, x2, x3, x4, x5, x6)  =  U40_ag(x3, x6)
U41_ag(x1, x2, x3, x4, x5)  =  U41_ag(x3, x5)
U42_ag(x1, x2, x3, x4, x5)  =  U42_ag(x4, x5)
U43_ag(x1, x2, x3, x4, x5)  =  U43_ag(x4, x5)
U44_ag(x1, x2, x3, x4, x5)  =  U44_ag(x3, x4, x5)
U45_ag(x1, x2, x3, x4, x5)  =  U45_ag(x4, x5)
U46_ag(x1, x2, x3, x4, x5, x6)  =  U46_ag(x3, x4, x5, x6)
U47_ag(x1, x2, x3, x4, x5)  =  U47_ag(x3, x4, x5)
U48_ag(x1, x2, x3, x4, x5)  =  U48_ag(x4, x5)
U49_ag(x1, x2, x3, x4, x5, x6)  =  U49_ag(x3, x4, x5, x6)
U50_ag(x1, x2, x3, x4, x5)  =  U50_ag(x3, x4, x5)
U51_ag(x1, x2, x3, x4, x5)  =  U51_ag(x4, x5)
U52_ag(x1, x2, x3, x4, x5, x6)  =  U52_ag(x3, x4, x5, x6)
U53_ag(x1, x2, x3, x4, x5)  =  U53_ag(x3, x4, x5)
U54_ag(x1, x2, x3, x4, x5, x6)  =  U54_ag(x5, x6)
U55_ag(x1, x2, x3, x4, x5, x6, x7)  =  U55_ag(x3, x5, x6, x7)
U56_ag(x1, x2, x3, x4, x5, x6)  =  U56_ag(x3, x5, x6)
U57_ag(x1, x2, x3, x4, x5, x6)  =  U57_ag(x5, x6)
U58_ag(x1, x2, x3, x4, x5, x6, x7)  =  U58_ag(x3, x5, x6, x7)
U59_ag(x1, x2, x3, x4, x5, x6, x7)  =  U59_ag(x3, x5, x7)
U60_ag(x1, x2, x3, x4, x5, x6)  =  U60_ag(x3, x5, x6)
merge152_in_aaag(x1, x2, x3, x4)  =  merge152_in_aaag(x4)
merge152_out_aaag(x1, x2, x3, x4)  =  merge152_out_aaag(x2, x3, x4)
U16_aaag(x1, x2, x3, x4, x5)  =  U16_aaag(x4, x5)
SPLIT16_IN_AAA(x1, x2, x3)  =  SPLIT16_IN_AAA

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

(125) UsableRulesProof (EQUIVALENT transformation)

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

(126) Obligation:

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

SPLIT16_IN_AAA(.(T49, T51), .(T49, X88), X89) → SPLIT16_IN_AAA(T51, X89, X88)

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

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

(127) PiDPToQDPProof (SOUND transformation)

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

(128) Obligation:

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

SPLIT16_IN_AAASPLIT16_IN_AAA

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

(129) NonTerminationProof (EQUIVALENT transformation)

We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

s = SPLIT16_IN_AAA evaluates to t =SPLIT16_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
  • Semiunifier: [ ]
  • Matcher: [ ]




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SPLIT16_IN_AAA to SPLIT16_IN_AAA.



(130) NO