Left Termination of the query pattern merge(b,b,f) w.r.t. the given Prolog program could successfully be proven:



PROLOG
  ↳ PrologToPiTRSProof

merge3({}0, X, X).
merge3(X, {}0, X).
merge3(.2(X, Xs), .2(Y, Ys), .2(X, Zs)) :- leq2(X, Y), merge3(Xs, .2(Y, Ys), Zs).
merge3(.2(X, Xs), .2(Y, Ys), .2(Y, Zs)) :- less2(Y, X), merge3(.2(X, Xs), Ys, Zs).
less2(00, s1(00)).
less2(s1(X), s1(Y)) :- less2(X, Y).
leq2(00, 00).
leq2(00, s1(00)).
leq2(s1(X), s1(Y)) :- leq2(X, Y).


With regard to the inferred argument filtering the predicates were used in the following modes:
merge3: (b,b,f)
leq2: (b,b)
less2: (b,b)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

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

merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)


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

MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> LEQ_2_IN_GG2(X, Y)
LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LEQ_2_IN_1_GG3(X, Y, leq_2_in_gg2(X, Y))
LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> LEQ_2_IN_GG2(X, Y)
IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> IF_MERGE_3_IN_2_GGA6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> MERGE_3_IN_GGA3(Xs, ._22(Y, Ys), Zs)
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> LESS_2_IN_GG2(Y, X)
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LESS_2_IN_1_GG3(X, Y, less_2_in_gg2(X, Y))
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)
IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> IF_MERGE_3_IN_4_GGA6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> MERGE_3_IN_GGA3(._22(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)
IF_MERGE_3_IN_2_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_2_GGA2(x1, x6)
MERGE_3_IN_GGA3(x1, x2, x3)  =  MERGE_3_IN_GGA2(x1, x2)
IF_MERGE_3_IN_1_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_1_GGA5(x1, x2, x3, x4, x6)
IF_MERGE_3_IN_3_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_3_GGA5(x1, x2, x3, x4, x6)
IF_MERGE_3_IN_4_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_4_GGA2(x3, x6)
IF_LESS_2_IN_1_GG3(x1, x2, x3)  =  IF_LESS_2_IN_1_GG1(x3)
LEQ_2_IN_GG2(x1, x2)  =  LEQ_2_IN_GG2(x1, x2)
IF_LEQ_2_IN_1_GG3(x1, x2, x3)  =  IF_LEQ_2_IN_1_GG1(x3)
LESS_2_IN_GG2(x1, x2)  =  LESS_2_IN_GG2(x1, x2)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> LEQ_2_IN_GG2(X, Y)
LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LEQ_2_IN_1_GG3(X, Y, leq_2_in_gg2(X, Y))
LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> LEQ_2_IN_GG2(X, Y)
IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> IF_MERGE_3_IN_2_GGA6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> MERGE_3_IN_GGA3(Xs, ._22(Y, Ys), Zs)
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> LESS_2_IN_GG2(Y, X)
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> IF_LESS_2_IN_1_GG3(X, Y, less_2_in_gg2(X, Y))
LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)
IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> IF_MERGE_3_IN_4_GGA6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> MERGE_3_IN_GGA3(._22(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)
IF_MERGE_3_IN_2_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_2_GGA2(x1, x6)
MERGE_3_IN_GGA3(x1, x2, x3)  =  MERGE_3_IN_GGA2(x1, x2)
IF_MERGE_3_IN_1_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_1_GGA5(x1, x2, x3, x4, x6)
IF_MERGE_3_IN_3_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_3_GGA5(x1, x2, x3, x4, x6)
IF_MERGE_3_IN_4_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_4_GGA2(x3, x6)
IF_LESS_2_IN_1_GG3(x1, x2, x3)  =  IF_LESS_2_IN_1_GG1(x3)
LEQ_2_IN_GG2(x1, x2)  =  LEQ_2_IN_GG2(x1, x2)
IF_LEQ_2_IN_1_GG3(x1, x2, x3)  =  IF_LEQ_2_IN_1_GG1(x3)
LESS_2_IN_GG2(x1, x2)  =  LESS_2_IN_GG2(x1, x2)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph contains 3 SCCs with 6 less nodes.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

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

LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)

The TRS R consists of the following rules:

merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)
LESS_2_IN_GG2(x1, x2)  =  LESS_2_IN_GG2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

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

LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

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

LESS_2_IN_GG2(s_11(X), s_11(Y)) -> LESS_2_IN_GG2(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {LESS_2_IN_GG2}.
By using the subterm criterion together with the size-change analysis 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:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

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

LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> LEQ_2_IN_GG2(X, Y)

The TRS R consists of the following rules:

merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)
LEQ_2_IN_GG2(x1, x2)  =  LEQ_2_IN_GG2(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

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

LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> LEQ_2_IN_GG2(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

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

LEQ_2_IN_GG2(s_11(X), s_11(Y)) -> LEQ_2_IN_GG2(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {LEQ_2_IN_GG2}.
By using the subterm criterion together with the size-change analysis 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:



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

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

IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> MERGE_3_IN_GGA3(Xs, ._22(Y, Ys), Zs)
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> MERGE_3_IN_GGA3(._22(X, Xs), Ys, Zs)
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))

The TRS R consists of the following rules:

merge_3_in_gga3([]_0, X, X) -> merge_3_out_gga3([]_0, X, X)
merge_3_in_gga3(X, []_0, X) -> merge_3_out_gga3(X, []_0, X)
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_1_gga6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(Xs, ._22(Y, Ys), Zs))
merge_3_in_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))
if_merge_3_in_3_gga6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_in_gga3(._22(X, Xs), Ys, Zs))
if_merge_3_in_4_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(._22(X, Xs), Ys, Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs))
if_merge_3_in_2_gga6(X, Xs, Y, Ys, Zs, merge_3_out_gga3(Xs, ._22(Y, Ys), Zs)) -> merge_3_out_gga3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs))

The argument filtering Pi contains the following mapping:
merge_3_in_gga3(x1, x2, x3)  =  merge_3_in_gga2(x1, x2)
[]_0  =  []_0
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
merge_3_out_gga3(x1, x2, x3)  =  merge_3_out_gga1(x3)
if_merge_3_in_1_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_1_gga5(x1, x2, x3, x4, x6)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
if_merge_3_in_2_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_2_gga2(x1, x6)
if_merge_3_in_3_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_3_gga5(x1, x2, x3, x4, x6)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
if_merge_3_in_4_gga6(x1, x2, x3, x4, x5, x6)  =  if_merge_3_in_4_gga2(x3, x6)
MERGE_3_IN_GGA3(x1, x2, x3)  =  MERGE_3_IN_GGA2(x1, x2)
IF_MERGE_3_IN_1_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_1_GGA5(x1, x2, x3, x4, x6)
IF_MERGE_3_IN_3_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_3_GGA5(x1, x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting we can delete all non-usable rules from R.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

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

IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_out_gg2(X, Y)) -> MERGE_3_IN_GGA3(Xs, ._22(Y, Ys), Zs)
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(X, Zs)) -> IF_MERGE_3_IN_1_GGA6(X, Xs, Y, Ys, Zs, leq_2_in_gg2(X, Y))
IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_out_gg2(Y, X)) -> MERGE_3_IN_GGA3(._22(X, Xs), Ys, Zs)
MERGE_3_IN_GGA3(._22(X, Xs), ._22(Y, Ys), ._22(Y, Zs)) -> IF_MERGE_3_IN_3_GGA6(X, Xs, Y, Ys, Zs, less_2_in_gg2(Y, X))

The TRS R consists of the following rules:

leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg2(0_0, 0_0)
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg2(0_0, s_11(0_0))
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg3(X, Y, leq_2_in_gg2(X, Y))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg2(0_0, s_11(0_0))
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg3(X, Y, less_2_in_gg2(X, Y))
if_leq_2_in_1_gg3(X, Y, leq_2_out_gg2(X, Y)) -> leq_2_out_gg2(s_11(X), s_11(Y))
if_less_2_in_1_gg3(X, Y, less_2_out_gg2(X, Y)) -> less_2_out_gg2(s_11(X), s_11(Y))

The argument filtering Pi contains the following mapping:
._22(x1, x2)  =  ._22(x1, x2)
0_0  =  0_0
s_11(x1)  =  s_11(x1)
leq_2_in_gg2(x1, x2)  =  leq_2_in_gg2(x1, x2)
leq_2_out_gg2(x1, x2)  =  leq_2_out_gg
if_leq_2_in_1_gg3(x1, x2, x3)  =  if_leq_2_in_1_gg1(x3)
less_2_in_gg2(x1, x2)  =  less_2_in_gg2(x1, x2)
less_2_out_gg2(x1, x2)  =  less_2_out_gg
if_less_2_in_1_gg3(x1, x2, x3)  =  if_less_2_in_1_gg1(x3)
MERGE_3_IN_GGA3(x1, x2, x3)  =  MERGE_3_IN_GGA2(x1, x2)
IF_MERGE_3_IN_1_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_1_GGA5(x1, x2, x3, x4, x6)
IF_MERGE_3_IN_3_GGA6(x1, x2, x3, x4, x5, x6)  =  IF_MERGE_3_IN_3_GGA5(x1, x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem into ordinary QDP problem by application of Pi.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPPoloProof

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

IF_MERGE_3_IN_1_GGA5(X, Xs, Y, Ys, leq_2_out_gg) -> MERGE_3_IN_GGA2(Xs, ._22(Y, Ys))
MERGE_3_IN_GGA2(._22(X, Xs), ._22(Y, Ys)) -> IF_MERGE_3_IN_1_GGA5(X, Xs, Y, Ys, leq_2_in_gg2(X, Y))
IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_out_gg) -> MERGE_3_IN_GGA2(._22(X, Xs), Ys)
MERGE_3_IN_GGA2(._22(X, Xs), ._22(Y, Ys)) -> IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_in_gg2(Y, X))

The TRS R consists of the following rules:

leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg1(leq_2_in_gg2(X, Y))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg1(less_2_in_gg2(X, Y))
if_leq_2_in_1_gg1(leq_2_out_gg) -> leq_2_out_gg
if_less_2_in_1_gg1(less_2_out_gg) -> less_2_out_gg

The set Q consists of the following terms:

leq_2_in_gg2(x0, x1)
less_2_in_gg2(x0, x1)
if_leq_2_in_1_gg1(x0)
if_less_2_in_1_gg1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {MERGE_3_IN_GGA2, IF_MERGE_3_IN_1_GGA5, IF_MERGE_3_IN_3_GGA5}.
By using a polynomial ordering, the following set of Dependency Pairs of this DP problem can be strictly oriented.

MERGE_3_IN_GGA2(._22(X, Xs), ._22(Y, Ys)) -> IF_MERGE_3_IN_1_GGA5(X, Xs, Y, Ys, leq_2_in_gg2(X, Y))
The remaining Dependency Pairs were at least non-strictly be oriented.

IF_MERGE_3_IN_1_GGA5(X, Xs, Y, Ys, leq_2_out_gg) -> MERGE_3_IN_GGA2(Xs, ._22(Y, Ys))
IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_out_gg) -> MERGE_3_IN_GGA2(._22(X, Xs), Ys)
MERGE_3_IN_GGA2(._22(X, Xs), ._22(Y, Ys)) -> IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_in_gg2(Y, X))
With the implicit AFS there is no usable rule.

Used ordering: POLO with Polynomial interpretation:


POL(if_leq_2_in_1_gg1(x1)) = 0   
POL(less_2_out_gg) = 0   
POL(0_0) = 0   
POL(MERGE_3_IN_GGA2(x1, x2)) = x1   
POL(._22(x1, x2)) = 1 + x2   
POL(IF_MERGE_3_IN_1_GGA5(x1, x2, x3, x4, x5)) = x2   
POL(if_less_2_in_1_gg1(x1)) = 0   
POL(leq_2_out_gg) = 0   
POL(leq_2_in_gg2(x1, x2)) = 0   
POL(s_11(x1)) = 0   
POL(IF_MERGE_3_IN_3_GGA5(x1, x2, x3, x4, x5)) = 1 + x2   
POL(less_2_in_gg2(x1, x2)) = 0   



↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ QDPPoloProof
QDP
                            ↳ DependencyGraphProof

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

IF_MERGE_3_IN_1_GGA5(X, Xs, Y, Ys, leq_2_out_gg) -> MERGE_3_IN_GGA2(Xs, ._22(Y, Ys))
IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_out_gg) -> MERGE_3_IN_GGA2(._22(X, Xs), Ys)
MERGE_3_IN_GGA2(._22(X, Xs), ._22(Y, Ys)) -> IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_in_gg2(Y, X))

The TRS R consists of the following rules:

leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg1(leq_2_in_gg2(X, Y))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg1(less_2_in_gg2(X, Y))
if_leq_2_in_1_gg1(leq_2_out_gg) -> leq_2_out_gg
if_less_2_in_1_gg1(less_2_out_gg) -> less_2_out_gg

The set Q consists of the following terms:

leq_2_in_gg2(x0, x1)
less_2_in_gg2(x0, x1)
if_leq_2_in_1_gg1(x0)
if_less_2_in_1_gg1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {MERGE_3_IN_GGA2, IF_MERGE_3_IN_1_GGA5, IF_MERGE_3_IN_3_GGA5}.
The approximation of the Dependency Graph contains 1 SCC with 1 less node.

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ QDPPoloProof
                          ↳ QDP
                            ↳ DependencyGraphProof
QDP
                                ↳ QDPSizeChangeProof

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

MERGE_3_IN_GGA2(._22(X, Xs), ._22(Y, Ys)) -> IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_in_gg2(Y, X))
IF_MERGE_3_IN_3_GGA5(X, Xs, Y, Ys, less_2_out_gg) -> MERGE_3_IN_GGA2(._22(X, Xs), Ys)

The TRS R consists of the following rules:

leq_2_in_gg2(0_0, 0_0) -> leq_2_out_gg
leq_2_in_gg2(0_0, s_11(0_0)) -> leq_2_out_gg
leq_2_in_gg2(s_11(X), s_11(Y)) -> if_leq_2_in_1_gg1(leq_2_in_gg2(X, Y))
less_2_in_gg2(0_0, s_11(0_0)) -> less_2_out_gg
less_2_in_gg2(s_11(X), s_11(Y)) -> if_less_2_in_1_gg1(less_2_in_gg2(X, Y))
if_leq_2_in_1_gg1(leq_2_out_gg) -> leq_2_out_gg
if_less_2_in_1_gg1(less_2_out_gg) -> less_2_out_gg

The set Q consists of the following terms:

leq_2_in_gg2(x0, x1)
less_2_in_gg2(x0, x1)
if_leq_2_in_1_gg1(x0)
if_less_2_in_1_gg1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_MERGE_3_IN_3_GGA5, MERGE_3_IN_GGA2}.
By using the subterm criterion together with the size-change analysis 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: