(0) Obligation:

Clauses:

merge(X, [], X).
merge([], X, X).
merge(.(A, X), .(B, Y), .(A, Z)) :- ','(le(A, B), merge(X, .(B, Y), Z)).
merge(.(A, X), .(B, Y), .(B, Z)) :- ','(gt(A, B), merge(.(A, X), Y, Z)).
gt(s(X), s(Y)) :- gt(X, Y).
gt(s(X), zero).
le(s(X), s(Y)) :- le(X, Y).
le(zero, s(Y)).
le(zero, zero).

Queries:

merge(g,g,a).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

le25(s(T45), s(T46)) :- le25(T45, T46).
le25(zero, s(T53)).
le25(zero, zero).
gt51(s(T103), s(T104)) :- gt51(T103, T104).
gt51(s(T109), zero).
merge1(T5, [], T5).
merge1([], [], []).
merge1([], T11, T11).
merge1(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) :- le25(T31, T32).
merge1(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) :- ','(le25(T31, T32), merge1(T18, .(s(T32), T20), T22)).
merge1(.(zero, T18), .(s(T64), T20), .(zero, T22)) :- merge1(T18, .(s(T64), T20), T22).
merge1(.(zero, T18), .(zero, T20), .(zero, T22)) :- merge1(T18, .(zero, T20), T22).
merge1(.(T85, T86), .(T87, T88), .(T87, T90)) :- gt51(T85, T87).
merge1(.(T85, T86), .(T87, T88), .(T87, T90)) :- ','(gt51(T85, T87), merge1(.(T85, T86), T88, T90)).
merge1(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) :- gt51(T133, T134).
merge1(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) :- ','(gt51(T133, T134), merge1(.(s(T133), T120), T122, T124)).
merge1(.(s(T145), T120), .(zero, T122), .(zero, T124)) :- merge1(.(s(T145), T120), T122, T124).

Queries:

merge1(g,g,a).

(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:
merge1_in: (b,b,f)
le25_in: (b,b)
gt51_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)

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

MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_GGA(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → LE25_IN_GG(T31, T32)
LE25_IN_GG(s(T45), s(T46)) → U1_GG(T45, T46, le25_in_gg(T45, T46))
LE25_IN_GG(s(T45), s(T46)) → LE25_IN_GG(T45, T46)
U3_GGA(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_GGA(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
U3_GGA(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20), T22)
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_GGA(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(s(T64), T20), T22)
MERGE1_IN_GGA(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_GGA(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
MERGE1_IN_GGA(.(zero, T18), .(zero, T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(zero, T20), T22)
MERGE1_IN_GGA(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_GGA(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
MERGE1_IN_GGA(.(T85, T86), .(T87, T88), .(T87, T90)) → GT51_IN_GG(T85, T87)
GT51_IN_GG(s(T103), s(T104)) → U2_GG(T103, T104, gt51_in_gg(T103, T104))
GT51_IN_GG(s(T103), s(T104)) → GT51_IN_GG(T103, T104)
U7_GGA(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_GGA(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
U7_GGA(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88, T90)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_GGA(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → GT51_IN_GG(T133, T134)
U9_GGA(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_GGA(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
U9_GGA(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122, T124)
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_GGA(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122), .(zero, T124)) → MERGE1_IN_GGA(.(s(T145), T120), T122, T124)

The TRS R consists of the following rules:

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
MERGE1_IN_GGA(x1, x2, x3)  =  MERGE1_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4, x5, x6)  =  U3_GGA(x1, x2, x3, x4, x6)
LE25_IN_GG(x1, x2)  =  LE25_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x1, x2, x3)
U4_GGA(x1, x2, x3, x4, x5, x6)  =  U4_GGA(x1, x2, x3, x4, x6)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x2, x3, x5)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x1, x2, x3, x4, x6)
GT51_IN_GG(x1, x2)  =  GT51_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x1, x2, x3)
U8_GGA(x1, x2, x3, x4, x5, x6)  =  U8_GGA(x1, x2, x3, x4, x6)
U9_GGA(x1, x2, x3, x4, x5, x6)  =  U9_GGA(x1, x2, x3, x4, x6)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x2, x3, x4, x6)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x1, x2, x3, x5)

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

(6) Obligation:

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

MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_GGA(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → LE25_IN_GG(T31, T32)
LE25_IN_GG(s(T45), s(T46)) → U1_GG(T45, T46, le25_in_gg(T45, T46))
LE25_IN_GG(s(T45), s(T46)) → LE25_IN_GG(T45, T46)
U3_GGA(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_GGA(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
U3_GGA(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20), T22)
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_GGA(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(s(T64), T20), T22)
MERGE1_IN_GGA(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_GGA(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
MERGE1_IN_GGA(.(zero, T18), .(zero, T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(zero, T20), T22)
MERGE1_IN_GGA(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_GGA(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
MERGE1_IN_GGA(.(T85, T86), .(T87, T88), .(T87, T90)) → GT51_IN_GG(T85, T87)
GT51_IN_GG(s(T103), s(T104)) → U2_GG(T103, T104, gt51_in_gg(T103, T104))
GT51_IN_GG(s(T103), s(T104)) → GT51_IN_GG(T103, T104)
U7_GGA(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_GGA(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
U7_GGA(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88, T90)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_GGA(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → GT51_IN_GG(T133, T134)
U9_GGA(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_GGA(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
U9_GGA(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122, T124)
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_GGA(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122), .(zero, T124)) → MERGE1_IN_GGA(.(s(T145), T120), T122, T124)

The TRS R consists of the following rules:

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
MERGE1_IN_GGA(x1, x2, x3)  =  MERGE1_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4, x5, x6)  =  U3_GGA(x1, x2, x3, x4, x6)
LE25_IN_GG(x1, x2)  =  LE25_IN_GG(x1, x2)
U1_GG(x1, x2, x3)  =  U1_GG(x1, x2, x3)
U4_GGA(x1, x2, x3, x4, x5, x6)  =  U4_GGA(x1, x2, x3, x4, x6)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x2, x3, x5)
U6_GGA(x1, x2, x3, x4)  =  U6_GGA(x1, x2, x4)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x1, x2, x3, x4, x6)
GT51_IN_GG(x1, x2)  =  GT51_IN_GG(x1, x2)
U2_GG(x1, x2, x3)  =  U2_GG(x1, x2, x3)
U8_GGA(x1, x2, x3, x4, x5, x6)  =  U8_GGA(x1, x2, x3, x4, x6)
U9_GGA(x1, x2, x3, x4, x5, x6)  =  U9_GGA(x1, x2, x3, x4, x6)
U10_GGA(x1, x2, x3, x4, x5, x6)  =  U10_GGA(x1, x2, x3, x4, x6)
U11_GGA(x1, x2, x3, x4, x5)  =  U11_GGA(x1, x2, x3, x5)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

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

(8) Complex Obligation (AND)

(9) Obligation:

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

GT51_IN_GG(s(T103), s(T104)) → GT51_IN_GG(T103, T104)

The TRS R consists of the following rules:

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
GT51_IN_GG(x1, x2)  =  GT51_IN_GG(x1, x2)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

GT51_IN_GG(s(T103), s(T104)) → GT51_IN_GG(T103, T104)

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

(12) PiDPToQDPProof (EQUIVALENT transformation)

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

(13) Obligation:

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

GT51_IN_GG(s(T103), s(T104)) → GT51_IN_GG(T103, T104)

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

(14) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • GT51_IN_GG(s(T103), s(T104)) → GT51_IN_GG(T103, T104)
    The graph contains the following edges 1 > 1, 2 > 2

(15) YES

(16) Obligation:

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

LE25_IN_GG(s(T45), s(T46)) → LE25_IN_GG(T45, T46)

The TRS R consists of the following rules:

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
LE25_IN_GG(x1, x2)  =  LE25_IN_GG(x1, x2)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

LE25_IN_GG(s(T45), s(T46)) → LE25_IN_GG(T45, T46)

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

(19) PiDPToQDPProof (EQUIVALENT transformation)

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

(20) Obligation:

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

LE25_IN_GG(s(T45), s(T46)) → LE25_IN_GG(T45, T46)

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

(21) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • LE25_IN_GG(s(T45), s(T46)) → LE25_IN_GG(T45, T46)
    The graph contains the following edges 1 > 1, 2 > 2

(22) YES

(23) Obligation:

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

U3_GGA(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20), T22)
MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_GGA(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(s(T64), T20), T22)
MERGE1_IN_GGA(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_GGA(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88, T90)
MERGE1_IN_GGA(.(zero, T18), .(zero, T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(zero, T20), T22)
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122), .(zero, T124)) → MERGE1_IN_GGA(.(s(T145), T120), T122, T124)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_GGA(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122, T124)

The TRS R consists of the following rules:

merge1_in_gga(T5, [], T5) → merge1_out_gga(T5, [], T5)
merge1_in_gga([], [], []) → merge1_out_gga([], [], [])
merge1_in_gga([], T11, T11) → merge1_out_gga([], T11, T11)
merge1_in_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_gga(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))
U3_gga(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → U4_gga(T31, T18, T32, T20, T22, merge1_in_gga(T18, .(s(T32), T20), T22))
merge1_in_gga(.(zero, T18), .(s(T64), T20), .(zero, T22)) → U5_gga(T18, T64, T20, T22, merge1_in_gga(T18, .(s(T64), T20), T22))
merge1_in_gga(.(zero, T18), .(zero, T20), .(zero, T22)) → U6_gga(T18, T20, T22, merge1_in_gga(T18, .(zero, T20), T22))
merge1_in_gga(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_gga(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U7_gga(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → U8_gga(T85, T86, T87, T88, T90, merge1_in_gga(.(T85, T86), T88, T90))
merge1_in_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_gga(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U9_gga(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → U10_gga(T133, T120, T134, T122, T124, merge1_in_gga(.(s(T133), T120), T122, T124))
merge1_in_gga(.(s(T145), T120), .(zero, T122), .(zero, T124)) → U11_gga(T145, T120, T122, T124, merge1_in_gga(.(s(T145), T120), T122, T124))
U11_gga(T145, T120, T122, T124, merge1_out_gga(.(s(T145), T120), T122, T124)) → merge1_out_gga(.(s(T145), T120), .(zero, T122), .(zero, T124))
U10_gga(T133, T120, T134, T122, T124, merge1_out_gga(.(s(T133), T120), T122, T124)) → merge1_out_gga(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124))
U8_gga(T85, T86, T87, T88, T90, merge1_out_gga(.(T85, T86), T88, T90)) → merge1_out_gga(.(T85, T86), .(T87, T88), .(T87, T90))
U6_gga(T18, T20, T22, merge1_out_gga(T18, .(zero, T20), T22)) → merge1_out_gga(.(zero, T18), .(zero, T20), .(zero, T22))
U5_gga(T18, T64, T20, T22, merge1_out_gga(T18, .(s(T64), T20), T22)) → merge1_out_gga(.(zero, T18), .(s(T64), T20), .(zero, T22))
U4_gga(T31, T18, T32, T20, T22, merge1_out_gga(T18, .(s(T32), T20), T22)) → merge1_out_gga(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22))

The argument filtering Pi contains the following mapping:
merge1_in_gga(x1, x2, x3)  =  merge1_in_gga(x1, x2)
[]  =  []
merge1_out_gga(x1, x2, x3)  =  merge1_out_gga(x1, x2)
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
U3_gga(x1, x2, x3, x4, x5, x6)  =  U3_gga(x1, x2, x3, x4, x6)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
U4_gga(x1, x2, x3, x4, x5, x6)  =  U4_gga(x1, x2, x3, x4, x6)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x2, x3, x5)
U6_gga(x1, x2, x3, x4)  =  U6_gga(x1, x2, x4)
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x1, x2, x3, x4, x6)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
U8_gga(x1, x2, x3, x4, x5, x6)  =  U8_gga(x1, x2, x3, x4, x6)
U9_gga(x1, x2, x3, x4, x5, x6)  =  U9_gga(x1, x2, x3, x4, x6)
U10_gga(x1, x2, x3, x4, x5, x6)  =  U10_gga(x1, x2, x3, x4, x6)
U11_gga(x1, x2, x3, x4, x5)  =  U11_gga(x1, x2, x3, x5)
MERGE1_IN_GGA(x1, x2, x3)  =  MERGE1_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4, x5, x6)  =  U3_GGA(x1, x2, x3, x4, x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x1, x2, x3, x4, x6)
U9_GGA(x1, x2, x3, x4, x5, x6)  =  U9_GGA(x1, x2, x3, x4, x6)

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

(24) UsableRulesProof (EQUIVALENT transformation)

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

(25) Obligation:

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

U3_GGA(T31, T18, T32, T20, T22, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20), T22)
MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20), .(s(T31), T22)) → U3_GGA(T31, T18, T32, T20, T22, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(s(T64), T20), T22)
MERGE1_IN_GGA(.(T85, T86), .(T87, T88), .(T87, T90)) → U7_GGA(T85, T86, T87, T88, T90, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, T90, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88, T90)
MERGE1_IN_GGA(.(zero, T18), .(zero, T20), .(zero, T22)) → MERGE1_IN_GGA(T18, .(zero, T20), T22)
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122), .(zero, T124)) → MERGE1_IN_GGA(.(s(T145), T120), T122, T124)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122), .(s(T134), T124)) → U9_GGA(T133, T120, T134, T122, T124, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, T124, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122, T124)

The TRS R consists of the following rules:

le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
le25_in_gg(x1, x2)  =  le25_in_gg(x1, x2)
U1_gg(x1, x2, x3)  =  U1_gg(x1, x2, x3)
zero  =  zero
le25_out_gg(x1, x2)  =  le25_out_gg(x1, x2)
gt51_in_gg(x1, x2)  =  gt51_in_gg(x1, x2)
U2_gg(x1, x2, x3)  =  U2_gg(x1, x2, x3)
gt51_out_gg(x1, x2)  =  gt51_out_gg(x1, x2)
MERGE1_IN_GGA(x1, x2, x3)  =  MERGE1_IN_GGA(x1, x2)
U3_GGA(x1, x2, x3, x4, x5, x6)  =  U3_GGA(x1, x2, x3, x4, x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x1, x2, x3, x4, x6)
U9_GGA(x1, x2, x3, x4, x5, x6)  =  U9_GGA(x1, x2, x3, x4, x6)

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

(26) PiDPToQDPProof (SOUND transformation)

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

(27) Obligation:

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

U3_GGA(T31, T18, T32, T20, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20))
MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20)) → U3_GGA(T31, T18, T32, T20, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20)) → MERGE1_IN_GGA(T18, .(s(T64), T20))
MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
MERGE1_IN_GGA(.(zero, T18), .(zero, T20)) → MERGE1_IN_GGA(T18, .(zero, T20))
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122)) → MERGE1_IN_GGA(.(s(T145), T120), T122)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)

The TRS R consists of the following rules:

le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The set Q consists of the following terms:

le25_in_gg(x0, x1)
gt51_in_gg(x0, x1)
U1_gg(x0, x1, x2)
U2_gg(x0, x1, x2)

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

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

MERGE1_IN_GGA(.(zero, T18), .(s(T64), T20)) → MERGE1_IN_GGA(T18, .(s(T64), T20))
MERGE1_IN_GGA(.(zero, T18), .(zero, T20)) → MERGE1_IN_GGA(T18, .(zero, T20))
MERGE1_IN_GGA(.(s(T145), T120), .(zero, T122)) → MERGE1_IN_GGA(.(s(T145), T120), T122)

Strictly oriented rules of the TRS R:

le25_in_gg(zero, s(T53)) → le25_out_gg(zero, s(T53))
le25_in_gg(zero, zero) → le25_out_gg(zero, zero)

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 2·x1 + 2·x2   
POL(MERGE1_IN_GGA(x1, x2)) = x1 + x2   
POL(U1_gg(x1, x2, x3)) = x1 + 2·x2 + x3   
POL(U2_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U3_GGA(x1, x2, x3, x4, x5)) = 2·x1 + x2 + 2·x3 + 2·x4 + x5   
POL(U7_GGA(x1, x2, x3, x4, x5)) = x1 + 2·x2 + x3 + 2·x4 + x5   
POL(U9_GGA(x1, x2, x3, x4, x5)) = 2·x1 + 2·x2 + 2·x3 + x4 + 2·x5   
POL(gt51_in_gg(x1, x2)) = x1 + x2   
POL(gt51_out_gg(x1, x2)) = x1 + x2   
POL(le25_in_gg(x1, x2)) = 2·x1 + 2·x2   
POL(le25_out_gg(x1, x2)) = x1 + 2·x2   
POL(s(x1)) = 2·x1   
POL(zero) = 2   

(29) Obligation:

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

U3_GGA(T31, T18, T32, T20, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20))
MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20)) → U3_GGA(T31, T18, T32, T20, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)

The TRS R consists of the following rules:

le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The set Q consists of the following terms:

le25_in_gg(x0, x1)
gt51_in_gg(x0, x1)
U1_gg(x0, x1, x2)
U2_gg(x0, x1, x2)

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

(30) 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 dependency pairs:

U3_GGA(T31, T18, T32, T20, le25_out_gg(T31, T32)) → MERGE1_IN_GGA(T18, .(s(T32), T20))


Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = x1 + x2   
POL(MERGE1_IN_GGA(x1, x2)) = 2·x1 + 2·x2   
POL(U1_gg(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(U2_gg(x1, x2, x3)) = x1 + x2 + x3   
POL(U3_GGA(x1, x2, x3, x4, x5)) = x1 + 2·x2 + 2·x3 + 2·x4 + x5   
POL(U7_GGA(x1, x2, x3, x4, x5)) = x1 + 2·x2 + x3 + 2·x4 + x5   
POL(U9_GGA(x1, x2, x3, x4, x5)) = 2·x1 + 2·x2 + x3 + 2·x4 + 2·x5   
POL(gt51_in_gg(x1, x2)) = x1 + x2   
POL(gt51_out_gg(x1, x2)) = x1 + x2   
POL(le25_in_gg(x1, x2)) = 2·x1 + 2·x2   
POL(le25_out_gg(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(s(x1)) = 2·x1   
POL(zero) = 0   

(31) Obligation:

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

MERGE1_IN_GGA(.(s(T31), T18), .(s(T32), T20)) → U3_GGA(T31, T18, T32, T20, le25_in_gg(T31, T32))
MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)

The TRS R consists of the following rules:

le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The set Q consists of the following terms:

le25_in_gg(x0, x1)
gt51_in_gg(x0, x1)
U1_gg(x0, x1, x2)
U2_gg(x0, x1, x2)

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

(32) DependencyGraphProof (EQUIVALENT transformation)

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

(33) Obligation:

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

MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)

The TRS R consists of the following rules:

le25_in_gg(s(T45), s(T46)) → U1_gg(T45, T46, le25_in_gg(T45, T46))
gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U1_gg(T45, T46, le25_out_gg(T45, T46)) → le25_out_gg(s(T45), s(T46))
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The set Q consists of the following terms:

le25_in_gg(x0, x1)
gt51_in_gg(x0, x1)
U1_gg(x0, x1, x2)
U2_gg(x0, x1, x2)

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

(34) 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.

(35) Obligation:

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

MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)

The TRS R consists of the following rules:

gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The set Q consists of the following terms:

le25_in_gg(x0, x1)
gt51_in_gg(x0, x1)
U1_gg(x0, x1, x2)
U2_gg(x0, x1, x2)

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

(36) 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].

le25_in_gg(x0, x1)
U1_gg(x0, x1, x2)

(37) Obligation:

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

MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)

The TRS R consists of the following rules:

gt51_in_gg(s(T103), s(T104)) → U2_gg(T103, T104, gt51_in_gg(T103, T104))
gt51_in_gg(s(T109), zero) → gt51_out_gg(s(T109), zero)
U2_gg(T103, T104, gt51_out_gg(T103, T104)) → gt51_out_gg(s(T103), s(T104))

The set Q consists of the following terms:

gt51_in_gg(x0, x1)
U2_gg(x0, x1, x2)

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

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

  • U7_GGA(T85, T86, T87, T88, gt51_out_gg(T85, T87)) → MERGE1_IN_GGA(.(T85, T86), T88)
    The graph contains the following edges 4 >= 2

  • U9_GGA(T133, T120, T134, T122, gt51_out_gg(T133, T134)) → MERGE1_IN_GGA(.(s(T133), T120), T122)
    The graph contains the following edges 4 >= 2

  • MERGE1_IN_GGA(.(T85, T86), .(T87, T88)) → U7_GGA(T85, T86, T87, T88, gt51_in_gg(T85, T87))
    The graph contains the following edges 1 > 1, 1 > 2, 2 > 3, 2 > 4

  • MERGE1_IN_GGA(.(s(T133), T120), .(s(T134), T122)) → U9_GGA(T133, T120, T134, T122, gt51_in_gg(T133, T134))
    The graph contains the following edges 1 > 1, 1 > 2, 2 > 3, 2 > 4

(39) YES