(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) PrologToPiTRSProof (SOUND transformation)

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

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_AAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x3, x4, x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x3, x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x2, x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x3, x5, x6)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x3, x5, x6)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x3, x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x2, x4, x6)
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x3, x4, x5, x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x3, x4, x5)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x2, x4, x5, x6)

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

(6) Obligation:

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

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_AAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x3, x4, x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x3, x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x2, x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x3, x5, x6)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x3, x5, x6)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x3, x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x2, x4, x6)
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x3, x4, x5, x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x3, x4, x5)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x2, x4, x5, x6)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 5 SCCs with 18 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

=_in_aa(X, X) → =_out_aa(X, X)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)

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

(12) PiDPToQDPProof (SOUND transformation)

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

(13) Obligation:

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

U6_GGG(Xs, Ys, Zs, =_out_aa) → MERGE_IN_GGG(.(Xs), Ys, Zs)
MERGE_IN_GGG(.(Xs), .(Ys), .(Zs)) → U6_GGG(Xs, Ys, Zs, =_in_aa)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

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

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • MERGE_IN_GGG(.(Xs), .(Ys), .(Zs)) → U6_GGG(Xs, Ys, Zs, =_in_aa)
    The graph contains the following edges 1 > 1, 2 > 2, 3 > 3

  • U6_GGG(Xs, Ys, Zs, =_out_aa) → MERGE_IN_GGG(.(Xs), Ys, Zs)
    The graph contains the following edges 2 >= 2, 3 >= 3

(15) TRUE

(16) Obligation:

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

U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

=_in_aa(X, X) → =_out_aa(X, X)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)

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

(19) PiDPToQDPProof (SOUND transformation)

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

(20) Obligation:

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

U6_GGA(Xs, Ys, =_out_aa) → MERGE_IN_GGA(.(Xs), Ys)
MERGE_IN_GGA(.(Xs), .(Ys)) → U6_GGA(Xs, Ys, =_in_aa)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

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

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • MERGE_IN_GGA(.(Xs), .(Ys)) → U6_GGA(Xs, Ys, =_in_aa)
    The graph contains the following edges 1 > 1, 2 > 2

  • U6_GGA(Xs, Ys, =_out_aa) → MERGE_IN_GGA(.(Xs), Ys)
    The graph contains the following edges 2 >= 2

(22) TRUE

(23) Obligation:

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

SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)

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

(24) UsableRulesProof (EQUIVALENT transformation)

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

(25) Obligation:

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

SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)

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

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

(26) PiDPToQDPProof (SOUND transformation)

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

(27) Obligation:

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

SPLIT_IN_GAA(.(Xs)) → SPLIT_IN_GAA(Xs)

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

(28) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • SPLIT_IN_GAA(.(Xs)) → SPLIT_IN_GAA(Xs)
    The graph contains the following edges 1 > 1

(29) TRUE

(30) Obligation:

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

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x3, x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x3, x5, x6)

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

(31) UsableRulesProof (EQUIVALENT transformation)

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

(32) Obligation:

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

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)

The TRS R consists of the following rules:

mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
=_in_aa(X, X) → =_out_aa(X, X)
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x3, x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x3, x5, x6)

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

(33) PiDPToQDPProof (SOUND transformation)

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

(34) Obligation:

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

U1_GA(Xs, split_out_gaa(.(.(Xs)), X1s, X2s)) → U2_GA(Xs, X2s, mergesort_in_ga(X1s))
U2_GA(Xs, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(Xs, split_in_gaa(.(.(Xs))))
U1_GA(Xs, split_out_gaa(.(.(Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.([])) → mergesort_out_ga(.([]), .([]))
mergesort_in_ga(.(.(Xs))) → U1_ga(Xs, split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(Xs, split_in_gaa(Xs))
U1_ga(Xs, split_out_gaa(.(.(Xs)), X1s, X2s)) → U2_ga(Xs, X2s, mergesort_in_ga(X1s))
U5_gaa(Xs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(Xs), .(Ys), Zs)
U2_ga(Xs, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Xs, Y1s, mergesort_in_ga(X2s))
split_in_gaa([]) → split_out_gaa([], [], [])
U3_ga(Xs, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(Xs, merge_in_gga(Y1s, Y2s))
U4_ga(Xs, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(.(Xs)), Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(Xs), .(Ys)) → U6_gga(Xs, Ys, =_in_aa)
U6_gga(Xs, Ys, =_out_aa) → U7_gga(Xs, Ys, merge_in_gga(.(Xs), Ys))
=_in_aa=_out_aa
U7_gga(Xs, Ys, merge_out_gga(.(Xs), Ys, Zs)) → merge_out_gga(.(Xs), .(Ys), .(Zs))

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0, x1)
U5_gaa(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
U4_ga(x0, x1)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0, x1, x2)

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

(35) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U1_GA(Xs, split_out_gaa(.(.(Xs)), X1s, X2s)) → U2_GA(Xs, X2s, mergesort_in_ga(X1s))
U1_GA(Xs, split_out_gaa(.(.(Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

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

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

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

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

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

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

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

POL(split_in_gaa(x1)) =
/0\
\0/
+
/01\
\10/
·x1

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

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

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

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

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

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

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

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

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

POL(=_in_aa) =
/0\
\0/

POL(=_out_aa) =
/1\
\1/

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

The following usable rules [FROCOS05] were oriented:

split_in_gaa(.(Xs)) → U5_gaa(Xs, split_in_gaa(Xs))
split_in_gaa([]) → split_out_gaa([], [], [])
U5_gaa(Xs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(Xs), .(Ys), Zs)

(36) Obligation:

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

U2_GA(Xs, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(Xs, split_in_gaa(.(.(Xs))))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.([])) → mergesort_out_ga(.([]), .([]))
mergesort_in_ga(.(.(Xs))) → U1_ga(Xs, split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(Xs, split_in_gaa(Xs))
U1_ga(Xs, split_out_gaa(.(.(Xs)), X1s, X2s)) → U2_ga(Xs, X2s, mergesort_in_ga(X1s))
U5_gaa(Xs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(Xs), .(Ys), Zs)
U2_ga(Xs, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Xs, Y1s, mergesort_in_ga(X2s))
split_in_gaa([]) → split_out_gaa([], [], [])
U3_ga(Xs, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(Xs, merge_in_gga(Y1s, Y2s))
U4_ga(Xs, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(.(Xs)), Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(Xs), .(Ys)) → U6_gga(Xs, Ys, =_in_aa)
U6_gga(Xs, Ys, =_out_aa) → U7_gga(Xs, Ys, merge_in_gga(.(Xs), Ys))
=_in_aa=_out_aa
U7_gga(Xs, Ys, merge_out_gga(.(Xs), Ys, Zs)) → merge_out_gga(.(Xs), .(Ys), .(Zs))

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0, x1)
U5_gaa(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
U4_ga(x0, x1)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0, x1, x2)

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

(37) DependencyGraphProof (EQUIVALENT transformation)

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

(38) TRUE

(39) Obligation:

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

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x3, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x2, x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x3, x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x3, x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x2, x4, x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x2, x4, x5, x6)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA

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

(40) UsableRulesProof (EQUIVALENT transformation)

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

(41) Obligation:

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

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

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

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

(42) PiDPToQDPProof (SOUND transformation)

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

(43) Obligation:

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

SPLIT_IN_AAASPLIT_IN_AAA

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

(44) 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 = SPLIT_IN_AAA evaluates to t =SPLIT_IN_AAA

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




Rewriting sequence

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



(45) FALSE

(46) PrologToPiTRSProof (SOUND transformation)

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

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(47) Obligation:

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

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)

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

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_AAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x3, x4, x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x5, x6)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x6)
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x3, x4, x5, x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x3, x5)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x6)

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

(49) Obligation:

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

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_AAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x3, x4, x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x5, x6)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x6)
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x3, x4, x5, x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x3, x5)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x6)

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

(50) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 5 SCCs with 18 less nodes.

(51) Complex Obligation (AND)

(52) Obligation:

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

U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)

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

(53) UsableRulesProof (EQUIVALENT transformation)

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

(54) Obligation:

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

U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGG(.(X, Xs), Ys, Zs)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

=_in_aa(X, X) → =_out_aa(X, X)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x2, x4, x5, x6)

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

(55) PiDPToQDPProof (SOUND transformation)

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

(56) Obligation:

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

U6_GGG(Xs, Ys, Zs, =_out_aa) → MERGE_IN_GGG(.(Xs), Ys, Zs)
MERGE_IN_GGG(.(Xs), .(Ys), .(Zs)) → U6_GGG(Xs, Ys, Zs, =_in_aa)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

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

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

  • MERGE_IN_GGG(.(Xs), .(Ys), .(Zs)) → U6_GGG(Xs, Ys, Zs, =_in_aa)
    The graph contains the following edges 1 > 1, 2 > 2, 3 > 3

  • U6_GGG(Xs, Ys, Zs, =_out_aa) → MERGE_IN_GGG(.(Xs), Ys, Zs)
    The graph contains the following edges 2 >= 2, 3 >= 3

(58) TRUE

(59) Obligation:

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

U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)

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

(60) UsableRulesProof (EQUIVALENT transformation)

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

(61) Obligation:

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

U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GGA(.(X, Xs), Ys, Zs)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

=_in_aa(X, X) → =_out_aa(X, X)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x2)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x2, x4, x6)

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

(62) PiDPToQDPProof (SOUND transformation)

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

(63) Obligation:

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

U6_GGA(Xs, Ys, =_out_aa) → MERGE_IN_GGA(.(Xs), Ys)
MERGE_IN_GGA(.(Xs), .(Ys)) → U6_GGA(Xs, Ys, =_in_aa)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

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

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

  • MERGE_IN_GGA(.(Xs), .(Ys)) → U6_GGA(Xs, Ys, =_in_aa)
    The graph contains the following edges 1 > 1, 2 > 2

  • U6_GGA(Xs, Ys, =_out_aa) → MERGE_IN_GGA(.(Xs), Ys)
    The graph contains the following edges 2 >= 2

(65) TRUE

(66) Obligation:

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

SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)

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

(67) UsableRulesProof (EQUIVALENT transformation)

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

(68) Obligation:

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

SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_GAA(Xs, Zs, Ys)

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

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

(69) PiDPToQDPProof (SOUND transformation)

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

(70) Obligation:

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

SPLIT_IN_GAA(.(Xs)) → SPLIT_IN_GAA(Xs)

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

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

  • SPLIT_IN_GAA(.(Xs)) → SPLIT_IN_GAA(Xs)
    The graph contains the following edges 1 > 1

(72) TRUE

(73) Obligation:

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

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)

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

(74) UsableRulesProof (EQUIVALENT transformation)

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

(75) Obligation:

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

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)

The TRS R consists of the following rules:

mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
=_in_aa(X, X) → =_out_aa(X, X)
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x2)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)

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

(76) PiDPToQDPProof (SOUND transformation)

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

(77) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s))
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.([])) → mergesort_out_ga(.([]))
mergesort_in_ga(.(.(Xs))) → U1_ga(split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_gaa([]) → split_out_gaa([], [])
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(.(Xs), .(Ys)) → U6_gga(Xs, Ys, =_in_aa)
U6_gga(Xs, Ys, =_out_aa) → U7_gga(merge_in_gga(.(Xs), Ys))
=_in_aa=_out_aa
U7_gga(merge_out_gga(Zs)) → merge_out_gga(.(Zs))

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
U3_ga(x0, x1)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0)

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

(78) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

mergesort_in_ga(.([])) → mergesort_out_ga(.([]))

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1)) = 1 + x1   
POL(=_in_aa) = 1   
POL(=_out_aa) = 1   
POL(MERGESORT_IN_GA(x1)) = 2·x1   
POL(U1_GA(x1)) = 2·x1   
POL(U1_ga(x1)) = 2·x1   
POL(U2_GA(x1, x2)) = 2·x1 + x2   
POL(U2_ga(x1, x2)) = 2·x1 + x2   
POL(U3_ga(x1, x2)) = x1 + x2   
POL(U4_ga(x1)) = x1   
POL(U5_gaa(x1)) = 1 + x1   
POL(U6_gga(x1, x2, x3)) = x1 + x2 + 2·x3   
POL(U7_gga(x1)) = 1 + x1   
POL([]) = 0   
POL(merge_in_gga(x1, x2)) = x1 + x2   
POL(merge_out_gga(x1)) = x1   
POL(mergesort_in_ga(x1)) = 2·x1   
POL(mergesort_out_ga(x1)) = x1   
POL(split_in_gaa(x1)) = x1   
POL(split_out_gaa(x1, x2)) = x1 + x2   

(79) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s))
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.(.(Xs))) → U1_ga(split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_gaa([]) → split_out_gaa([], [])
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(.(Xs), .(Ys)) → U6_gga(Xs, Ys, =_in_aa)
U6_gga(Xs, Ys, =_out_aa) → U7_gga(merge_in_gga(.(Xs), Ys))
=_in_aa=_out_aa
U7_gga(merge_out_gga(Zs)) → merge_out_gga(.(Zs))

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
U3_ga(x0, x1)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0)

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

(80) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

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

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

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

POL(mergesort_in_ga(x1)) =
/0\
\0/
+
/10\
\01/
·x1

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

POL(MERGESORT_IN_GA(x1)) = 0 +
[0,0]
·x1

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

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

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

POL(U1_ga(x1)) =
/0\
\0/
+
/01\
\01/
·x1

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

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

POL(U3_ga(x1, x2)) =
/1\
\1/
+
/00\
\00/
·x1 +
/00\
\00/
·x2

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

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

POL(merge_out_gga(x1)) =
/0\
\1/
+
/10\
\10/
·x1

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

POL(=_in_aa) =
/0\
\0/

POL(=_out_aa) =
/1\
\1/

POL(U7_gga(x1)) =
/0\
\1/
+
/10\
\11/
·x1

The following usable rules [FROCOS05] were oriented:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.(.(Xs))) → U1_ga(split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)

(81) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s))
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.(.(Xs))) → U1_ga(split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_gaa([]) → split_out_gaa([], [])
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(.(Xs), .(Ys)) → U6_gga(Xs, Ys, =_in_aa)
U6_gga(Xs, Ys, =_out_aa) → U7_gga(merge_in_gga(.(Xs), Ys))
=_in_aa=_out_aa
U7_gga(merge_out_gga(Zs)) → merge_out_gga(.(Zs))

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
U3_ga(x0, x1)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0)

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

(82) DependencyGraphProof (EQUIVALENT transformation)

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

(83) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.(.(Xs))) → U1_ga(split_in_gaa(.(.(Xs))))
split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_gaa([]) → split_out_gaa([], [])
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(.(Xs), .(Ys)) → U6_gga(Xs, Ys, =_in_aa)
U6_gga(Xs, Ys, =_out_aa) → U7_gga(merge_in_gga(.(Xs), Ys))
=_in_aa=_out_aa
U7_gga(merge_out_gga(Zs)) → merge_out_gga(.(Zs))

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
U3_ga(x0, x1)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0)

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

(84) UsableRulesProof (EQUIVALENT transformation)

As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [LPAR04] we can delete all non-usable rules [FROCOS05] from R.

(85) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))

The TRS R consists of the following rules:

split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
split_in_gaa([]) → split_out_gaa([], [])
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
U3_ga(x0, x1)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0)

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

(86) QReductionProof (EQUIVALENT transformation)

We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.[THIEMANN].

mergesort_in_ga(x0)
U1_ga(x0)
U2_ga(x0, x1)
U3_ga(x0, x1)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0, x1, x2)
=_in_aa
U7_gga(x0)

(87) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))

The TRS R consists of the following rules:

split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
split_in_gaa([]) → split_out_gaa([], [])
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)

The set Q consists of the following terms:

split_in_gaa(x0)
U5_gaa(x0)

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

(88) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MERGESORT_IN_GA(.(.(Xs))) → U1_GA(split_in_gaa(.(.(Xs))))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

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

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

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

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

POL(split_in_gaa(x1)) =
/0\
\0/
+
/10\
\01/
·x1

POL(U5_gaa(x1)) =
/1\
\1/
+
/01\
\11/
·x1

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

The following usable rules [FROCOS05] were oriented:

split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
split_in_gaa([]) → split_out_gaa([], [])
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)

(89) Obligation:

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

U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

split_in_gaa(.(Xs)) → U5_gaa(split_in_gaa(Xs))
split_in_gaa([]) → split_out_gaa([], [])
U5_gaa(split_out_gaa(Zs, Ys)) → split_out_gaa(.(Ys), Zs)

The set Q consists of the following terms:

split_in_gaa(x0)
U5_gaa(x0)

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

(90) DependencyGraphProof (EQUIVALENT transformation)

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

(91) TRUE

(92) Obligation:

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

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_aaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_aaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_gaa(Xs, Zs, Ys))
U5_gaa(X, Xs, Ys, Zs, split_out_gaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gga(.(X, Xs), Ys, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gga(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_ggg(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_ggg(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .(x2)
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x3, x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x2, x4, x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x3, x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x3, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x2, x4, x5, x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA

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

(93) UsableRulesProof (EQUIVALENT transformation)

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

(94) Obligation:

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

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

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

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

(95) PiDPToQDPProof (SOUND transformation)

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

(96) Obligation:

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

SPLIT_IN_AAASPLIT_IN_AAA

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

(97) 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 = SPLIT_IN_AAA evaluates to t =SPLIT_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 SPLIT_IN_AAA to SPLIT_IN_AAA.



(98) FALSE