Left Termination of the query pattern test_snake(b,b,b) w.r.t. the given Prolog program could not be shown:



PROLOG
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

testsnake3(Pattern, C, R) :- s2l2(C, Cols), s2l2(R, Rows), snake3(Pattern, Cols, Rows).
s2l2(00, nil0).
s2l2(s1(X), cons2(underscore, Y)) :- s2l2(X, Y).
snake3(Pattern, Cols, Rows) :- infinitesnake3(Pattern, InfSnake, InfSnake), producesnake4(Rows, Cols, InfSnake, Snake), coilit2(Snake, odd0).
infinitesnake3(nil0, S, S).
infinitesnake3(cons2(A, R), cons2(A, T), S) :- infinitesnake3(R, T, S).
producesnake4(nil0, underscore1, underscore2, nil0).
producesnake4(cons2(underscore3, Rows), Cols, InfSnake, cons2(Part, Tail)) :- partofsnake4(Cols, InfSnake, NewInfSnake, Part), producesnake4(Rows, Cols, NewInfSnake, Tail).
partofsnake4(nil0, RestSnake, RestSnake, nil0).
partofsnake4(cons2(underscore4, R), cons2(Ring, Rings), RestSnake, cons2(Ring, RestRings)) :- partofsnake4(R, Rings, RestSnake, RestRings).
coilit2(nil0, underscore5).
coilit2(cons2(Line, Lines), odd0) :- coilit2(Lines, even0).
coilit2(cons2(Line, Lines), even0) :- reverse22(Line, Line1), coilit2(Lines, odd0).
reverse22(List, Reversed) :- reverse3(List, nil0, Reversed).
reverse3(nil0, Reversed, Reversed).
reverse3(cons2(Head, Tail), SoFar, Reversed) :- reverse3(Tail, cons2(Head, SoFar), Reversed).


With regard to the inferred argument filtering the predicates were used in the following modes:
test_snake3: (b,b,b)
s2l2: (b,f)
snake3: (b,b,b)
infinite_snake3: (b,f,f)
produce_snake4: (b,b,f,f)
part_of_snake4: (b,f,f,f)
coil_it2: (b,b)
reverse22: (f,f)
reverse3: (f,b,f)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:


test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

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

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg


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

TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> S2L_2_IN_GA2(C, Cols)
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> IF_S2L_2_IN_1_GA4(X, underscore, Y, s2l_2_in_ga2(X, Y))
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> S2L_2_IN_GA2(R, Rows)
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> IF_TEST_SNAKE_3_IN_3_GGG6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> SNAKE_3_IN_GGG3(Pattern, Cols, Rows)
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> INFINITE_SNAKE_3_IN_GAA3(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> IF_INFINITE_SNAKE_3_IN_1_GAA5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> PART_OF_SNAKE_4_IN_GAAA4(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> IF_PART_OF_SNAKE_4_IN_1_GAAA7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> IF_PRODUCE_SNAKE_4_IN_2_GGAA8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> IF_SNAKE_3_IN_3_GGG5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> COIL_IT_2_IN_GG2(Snake, odd_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> IF_COIL_IT_2_IN_1_GG3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> REVERSE2_2_IN_AA2(Line, Line1)
REVERSE2_2_IN_AA2(List, Reversed) -> IF_REVERSE2_2_IN_1_AA3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
REVERSE2_2_IN_AA2(List, Reversed) -> REVERSE_3_IN_AGA3(List, nil_0, Reversed)
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> IF_REVERSE_3_IN_1_AGA5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> IF_COIL_IT_2_IN_3_GG3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
TEST_SNAKE_3_IN_GGG3(x1, x2, x3)  =  TEST_SNAKE_3_IN_GGG3(x1, x2, x3)
IF_COIL_IT_2_IN_1_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_1_GG1(x3)
IF_REVERSE2_2_IN_1_AA3(x1, x2, x3)  =  IF_REVERSE2_2_IN_1_AA1(x3)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
IF_REVERSE_3_IN_1_AGA5(x1, x2, x3, x4, x5)  =  IF_REVERSE_3_IN_1_AGA1(x5)
IF_INFINITE_SNAKE_3_IN_1_GAA5(x1, x2, x3, x4, x5)  =  IF_INFINITE_SNAKE_3_IN_1_GAA1(x5)
IF_SNAKE_3_IN_3_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_3_GGG1(x5)
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)
IF_TEST_SNAKE_3_IN_3_GGG6(x1, x2, x3, x4, x5, x6)  =  IF_TEST_SNAKE_3_IN_3_GGG1(x6)
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
IF_TEST_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_TEST_SNAKE_3_IN_2_GGG3(x1, x4, x5)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(x1, x2)
IF_COIL_IT_2_IN_3_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_3_GG1(x3)
IF_PART_OF_SNAKE_4_IN_1_GAAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PART_OF_SNAKE_4_IN_1_GAAA1(x7)
REVERSE_3_IN_AGA3(x1, x2, x3)  =  REVERSE_3_IN_AGA1(x2)
IF_PRODUCE_SNAKE_4_IN_2_GGAA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_PRODUCE_SNAKE_4_IN_2_GGAA1(x8)
INFINITE_SNAKE_3_IN_GAA3(x1, x2, x3)  =  INFINITE_SNAKE_3_IN_GAA1(x1)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_2_IN_GG2(x1, x2)
REVERSE2_2_IN_AA2(x1, x2)  =  REVERSE2_2_IN_AA
IF_TEST_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_TEST_SNAKE_3_IN_1_GGG3(x1, x3, x4)
PART_OF_SNAKE_4_IN_GAAA4(x1, x2, x3, x4)  =  PART_OF_SNAKE_4_IN_GAAA1(x1)
IF_S2L_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_S2L_2_IN_1_GA1(x4)
IF_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_SNAKE_3_IN_1_GGG3(x2, x3, x4)
SNAKE_3_IN_GGG3(x1, x2, x3)  =  SNAKE_3_IN_GGG3(x1, x2, x3)
IF_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_2_GGG1(x5)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

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

TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> S2L_2_IN_GA2(C, Cols)
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> IF_S2L_2_IN_1_GA4(X, underscore, Y, s2l_2_in_ga2(X, Y))
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> S2L_2_IN_GA2(R, Rows)
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> IF_TEST_SNAKE_3_IN_3_GGG6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> SNAKE_3_IN_GGG3(Pattern, Cols, Rows)
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> INFINITE_SNAKE_3_IN_GAA3(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> IF_INFINITE_SNAKE_3_IN_1_GAA5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> PART_OF_SNAKE_4_IN_GAAA4(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> IF_PART_OF_SNAKE_4_IN_1_GAAA7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> IF_PRODUCE_SNAKE_4_IN_2_GGAA8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> IF_SNAKE_3_IN_3_GGG5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> COIL_IT_2_IN_GG2(Snake, odd_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> IF_COIL_IT_2_IN_1_GG3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> REVERSE2_2_IN_AA2(Line, Line1)
REVERSE2_2_IN_AA2(List, Reversed) -> IF_REVERSE2_2_IN_1_AA3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
REVERSE2_2_IN_AA2(List, Reversed) -> REVERSE_3_IN_AGA3(List, nil_0, Reversed)
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> IF_REVERSE_3_IN_1_AGA5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> IF_COIL_IT_2_IN_3_GG3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
TEST_SNAKE_3_IN_GGG3(x1, x2, x3)  =  TEST_SNAKE_3_IN_GGG3(x1, x2, x3)
IF_COIL_IT_2_IN_1_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_1_GG1(x3)
IF_REVERSE2_2_IN_1_AA3(x1, x2, x3)  =  IF_REVERSE2_2_IN_1_AA1(x3)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
IF_REVERSE_3_IN_1_AGA5(x1, x2, x3, x4, x5)  =  IF_REVERSE_3_IN_1_AGA1(x5)
IF_INFINITE_SNAKE_3_IN_1_GAA5(x1, x2, x3, x4, x5)  =  IF_INFINITE_SNAKE_3_IN_1_GAA1(x5)
IF_SNAKE_3_IN_3_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_3_GGG1(x5)
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)
IF_TEST_SNAKE_3_IN_3_GGG6(x1, x2, x3, x4, x5, x6)  =  IF_TEST_SNAKE_3_IN_3_GGG1(x6)
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
IF_TEST_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_TEST_SNAKE_3_IN_2_GGG3(x1, x4, x5)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(x1, x2)
IF_COIL_IT_2_IN_3_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_3_GG1(x3)
IF_PART_OF_SNAKE_4_IN_1_GAAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PART_OF_SNAKE_4_IN_1_GAAA1(x7)
REVERSE_3_IN_AGA3(x1, x2, x3)  =  REVERSE_3_IN_AGA1(x2)
IF_PRODUCE_SNAKE_4_IN_2_GGAA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_PRODUCE_SNAKE_4_IN_2_GGAA1(x8)
INFINITE_SNAKE_3_IN_GAA3(x1, x2, x3)  =  INFINITE_SNAKE_3_IN_GAA1(x1)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_2_IN_GG2(x1, x2)
REVERSE2_2_IN_AA2(x1, x2)  =  REVERSE2_2_IN_AA
IF_TEST_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_TEST_SNAKE_3_IN_1_GGG3(x1, x3, x4)
PART_OF_SNAKE_4_IN_GAAA4(x1, x2, x3, x4)  =  PART_OF_SNAKE_4_IN_GAAA1(x1)
IF_S2L_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_S2L_2_IN_1_GA1(x4)
IF_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_SNAKE_3_IN_1_GGG3(x2, x3, x4)
SNAKE_3_IN_GGG3(x1, x2, x3)  =  SNAKE_3_IN_GGG3(x1, x2, x3)
IF_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_2_GGG1(x5)

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

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

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

REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
REVERSE_3_IN_AGA3(x1, x2, x3)  =  REVERSE_3_IN_AGA1(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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)

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

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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

REVERSE_3_IN_AGA1(SoFar) -> REVERSE_3_IN_AGA1(cons_21(SoFar))

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {REVERSE_3_IN_AGA1}.

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

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

COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)

The argument filtering Pi contains the following mapping:
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_2_IN_GG2(x1, x2)

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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

COIL_IT_2_IN_GG2(cons_21(Lines), even_0) -> IF_COIL_IT_2_IN_2_GG2(Lines, reverse2_2_in_aa)
COIL_IT_2_IN_GG2(cons_21(Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
IF_COIL_IT_2_IN_2_GG2(Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

reverse2_2_in_aa -> if_reverse2_2_in_1_aa1(reverse_3_in_aga1(nil_0))
if_reverse2_2_in_1_aa1(reverse_3_out_aga2(List, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
reverse_3_in_aga1(Reversed) -> reverse_3_out_aga2(nil_0, Reversed)
reverse_3_in_aga1(SoFar) -> if_reverse_3_in_1_aga1(reverse_3_in_aga1(cons_21(SoFar)))
if_reverse_3_in_1_aga1(reverse_3_out_aga2(Tail, Reversed)) -> reverse_3_out_aga2(cons_21(Tail), Reversed)

The set Q consists of the following terms:

reverse2_2_in_aa
if_reverse2_2_in_1_aa1(x0)
reverse_3_in_aga1(x0)
if_reverse_3_in_1_aga1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_COIL_IT_2_IN_2_GG2, COIL_IT_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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
PART_OF_SNAKE_4_IN_GAAA4(x1, x2, x3, x4)  =  PART_OF_SNAKE_4_IN_GAAA1(x1)

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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)

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

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
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

PART_OF_SNAKE_4_IN_GAAA1(cons_21(R)) -> PART_OF_SNAKE_4_IN_GAAA1(R)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {PART_OF_SNAKE_4_IN_GAAA1}.
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
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(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
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)

The TRS R consists of the following rules:

part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))

The argument filtering Pi contains the following mapping:
nil_0  =  nil_0
cons_22(x1, x2)  =  cons_21(x2)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(x1, x2)

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
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

PRODUCE_SNAKE_4_IN_GGAA2(cons_21(Rows), Cols) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA3(Rows, Cols, part_of_snake_4_in_gaaa1(Cols))
IF_PRODUCE_SNAKE_4_IN_1_GGAA3(Rows, Cols, part_of_snake_4_out_gaaa1(Part)) -> PRODUCE_SNAKE_4_IN_GGAA2(Rows, Cols)

The TRS R consists of the following rules:

part_of_snake_4_in_gaaa1(nil_0) -> part_of_snake_4_out_gaaa1(nil_0)
part_of_snake_4_in_gaaa1(cons_21(R)) -> if_part_of_snake_4_in_1_gaaa1(part_of_snake_4_in_gaaa1(R))
if_part_of_snake_4_in_1_gaaa1(part_of_snake_4_out_gaaa1(RestRings)) -> part_of_snake_4_out_gaaa1(cons_21(RestRings))

The set Q consists of the following terms:

part_of_snake_4_in_gaaa1(x0)
if_part_of_snake_4_in_1_gaaa1(x0)

We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {IF_PRODUCE_SNAKE_4_IN_1_GGAA3, PRODUCE_SNAKE_4_IN_GGAA2}.
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
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
INFINITE_SNAKE_3_IN_GAA3(x1, x2, x3)  =  INFINITE_SNAKE_3_IN_GAA1(x1)

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
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)

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

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
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

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

INFINITE_SNAKE_3_IN_GAA1(cons_21(R)) -> INFINITE_SNAKE_3_IN_GAA1(R)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {INFINITE_SNAKE_3_IN_GAA1}.
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
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

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

S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg3(x1, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga1(x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga1(x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg3(x1, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg1(x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg3(x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa1(x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg1(x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa1(x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa1(x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa1(x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa1(x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg1(x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg1(x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga2(x1, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga1(x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg1(x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)

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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

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

S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)

R is empty.
The argument filtering Pi contains the following mapping:
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)

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
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
  ↳ PrologToPiTRSProof

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

S2L_2_IN_GA1(s_11(X)) -> S2L_2_IN_GA1(X)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
The head symbols of this DP problem are {S2L_2_IN_GA1}.
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:


With regard to the inferred argument filtering the predicates were used in the following modes:
test_snake3: (b,b,b)
s2l2: (b,f)
snake3: (b,b,b)
infinite_snake3: (b,f,f)
produce_snake4: (b,b,f,f)
part_of_snake4: (b,f,f,f)
coil_it2: (b,b)
reverse22: (f,f)
reverse3: (f,b,f)
Transforming PROLOG into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of PROLOG



↳ PROLOG
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

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

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)


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

TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> S2L_2_IN_GA2(C, Cols)
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> IF_S2L_2_IN_1_GA4(X, underscore, Y, s2l_2_in_ga2(X, Y))
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> S2L_2_IN_GA2(R, Rows)
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> IF_TEST_SNAKE_3_IN_3_GGG6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> SNAKE_3_IN_GGG3(Pattern, Cols, Rows)
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> INFINITE_SNAKE_3_IN_GAA3(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> IF_INFINITE_SNAKE_3_IN_1_GAA5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> PART_OF_SNAKE_4_IN_GAAA4(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> IF_PART_OF_SNAKE_4_IN_1_GAAA7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> IF_PRODUCE_SNAKE_4_IN_2_GGAA8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> IF_SNAKE_3_IN_3_GGG5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> COIL_IT_2_IN_GG2(Snake, odd_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> IF_COIL_IT_2_IN_1_GG3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> REVERSE2_2_IN_AA2(Line, Line1)
REVERSE2_2_IN_AA2(List, Reversed) -> IF_REVERSE2_2_IN_1_AA3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
REVERSE2_2_IN_AA2(List, Reversed) -> REVERSE_3_IN_AGA3(List, nil_0, Reversed)
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> IF_REVERSE_3_IN_1_AGA5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> IF_COIL_IT_2_IN_3_GG3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
TEST_SNAKE_3_IN_GGG3(x1, x2, x3)  =  TEST_SNAKE_3_IN_GGG3(x1, x2, x3)
IF_COIL_IT_2_IN_1_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_1_GG2(x2, x3)
IF_REVERSE2_2_IN_1_AA3(x1, x2, x3)  =  IF_REVERSE2_2_IN_1_AA1(x3)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
IF_REVERSE_3_IN_1_AGA5(x1, x2, x3, x4, x5)  =  IF_REVERSE_3_IN_1_AGA2(x3, x5)
IF_INFINITE_SNAKE_3_IN_1_GAA5(x1, x2, x3, x4, x5)  =  IF_INFINITE_SNAKE_3_IN_1_GAA2(x2, x5)
IF_SNAKE_3_IN_3_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_3_GGG4(x1, x2, x3, x5)
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)
IF_TEST_SNAKE_3_IN_3_GGG6(x1, x2, x3, x4, x5, x6)  =  IF_TEST_SNAKE_3_IN_3_GGG4(x1, x2, x3, x6)
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
IF_TEST_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_TEST_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(x1, x2)
IF_COIL_IT_2_IN_3_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_3_GG2(x2, x3)
IF_PART_OF_SNAKE_4_IN_1_GAAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PART_OF_SNAKE_4_IN_1_GAAA2(x2, x7)
REVERSE_3_IN_AGA3(x1, x2, x3)  =  REVERSE_3_IN_AGA1(x2)
IF_PRODUCE_SNAKE_4_IN_2_GGAA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_PRODUCE_SNAKE_4_IN_2_GGAA3(x2, x3, x8)
INFINITE_SNAKE_3_IN_GAA3(x1, x2, x3)  =  INFINITE_SNAKE_3_IN_GAA1(x1)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_2_IN_GG2(x1, x2)
REVERSE2_2_IN_AA2(x1, x2)  =  REVERSE2_2_IN_AA
IF_TEST_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_TEST_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)
PART_OF_SNAKE_4_IN_GAAA4(x1, x2, x3, x4)  =  PART_OF_SNAKE_4_IN_GAAA1(x1)
IF_S2L_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_S2L_2_IN_1_GA2(x1, x4)
IF_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)
SNAKE_3_IN_GGG3(x1, x2, x3)  =  SNAKE_3_IN_GGG3(x1, x2, x3)
IF_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_2_GGG4(x1, x2, x3, x5)

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

↳ PROLOG
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

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

TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
TEST_SNAKE_3_IN_GGG3(Pattern, C, R) -> S2L_2_IN_GA2(C, Cols)
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> IF_S2L_2_IN_1_GA4(X, underscore, Y, s2l_2_in_ga2(X, Y))
S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
IF_TEST_SNAKE_3_IN_1_GGG4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> S2L_2_IN_GA2(R, Rows)
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> IF_TEST_SNAKE_3_IN_3_GGG6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
IF_TEST_SNAKE_3_IN_2_GGG5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> SNAKE_3_IN_GGG3(Pattern, Cols, Rows)
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
SNAKE_3_IN_GGG3(Pattern, Cols, Rows) -> INFINITE_SNAKE_3_IN_GAA3(Pattern, InfSnake, InfSnake)
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> IF_INFINITE_SNAKE_3_IN_1_GAA5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
IF_SNAKE_3_IN_1_GGG4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, InfSnake, Snake)
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> PART_OF_SNAKE_4_IN_GAAA4(Cols, InfSnake, NewInfSnake, Part)
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> IF_PART_OF_SNAKE_4_IN_1_GAAA7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> IF_PRODUCE_SNAKE_4_IN_2_GGAA8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> IF_SNAKE_3_IN_3_GGG5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
IF_SNAKE_3_IN_2_GGG5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> COIL_IT_2_IN_GG2(Snake, odd_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> IF_COIL_IT_2_IN_1_GG3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> REVERSE2_2_IN_AA2(Line, Line1)
REVERSE2_2_IN_AA2(List, Reversed) -> IF_REVERSE2_2_IN_1_AA3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
REVERSE2_2_IN_AA2(List, Reversed) -> REVERSE_3_IN_AGA3(List, nil_0, Reversed)
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> IF_REVERSE_3_IN_1_AGA5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> IF_COIL_IT_2_IN_3_GG3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
TEST_SNAKE_3_IN_GGG3(x1, x2, x3)  =  TEST_SNAKE_3_IN_GGG3(x1, x2, x3)
IF_COIL_IT_2_IN_1_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_1_GG2(x2, x3)
IF_REVERSE2_2_IN_1_AA3(x1, x2, x3)  =  IF_REVERSE2_2_IN_1_AA1(x3)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
IF_REVERSE_3_IN_1_AGA5(x1, x2, x3, x4, x5)  =  IF_REVERSE_3_IN_1_AGA2(x3, x5)
IF_INFINITE_SNAKE_3_IN_1_GAA5(x1, x2, x3, x4, x5)  =  IF_INFINITE_SNAKE_3_IN_1_GAA2(x2, x5)
IF_SNAKE_3_IN_3_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_3_GGG4(x1, x2, x3, x5)
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)
IF_TEST_SNAKE_3_IN_3_GGG6(x1, x2, x3, x4, x5, x6)  =  IF_TEST_SNAKE_3_IN_3_GGG4(x1, x2, x3, x6)
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
IF_TEST_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_TEST_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(x1, x2)
IF_COIL_IT_2_IN_3_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_3_GG2(x2, x3)
IF_PART_OF_SNAKE_4_IN_1_GAAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PART_OF_SNAKE_4_IN_1_GAAA2(x2, x7)
REVERSE_3_IN_AGA3(x1, x2, x3)  =  REVERSE_3_IN_AGA1(x2)
IF_PRODUCE_SNAKE_4_IN_2_GGAA8(x1, x2, x3, x4, x5, x6, x7, x8)  =  IF_PRODUCE_SNAKE_4_IN_2_GGAA3(x2, x3, x8)
INFINITE_SNAKE_3_IN_GAA3(x1, x2, x3)  =  INFINITE_SNAKE_3_IN_GAA1(x1)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_2_IN_GG2(x1, x2)
REVERSE2_2_IN_AA2(x1, x2)  =  REVERSE2_2_IN_AA
IF_TEST_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_TEST_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)
PART_OF_SNAKE_4_IN_GAAA4(x1, x2, x3, x4)  =  PART_OF_SNAKE_4_IN_GAAA1(x1)
IF_S2L_2_IN_1_GA4(x1, x2, x3, x4)  =  IF_S2L_2_IN_1_GA2(x1, x4)
IF_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)  =  IF_SNAKE_3_IN_1_GGG4(x1, x2, x3, x4)
SNAKE_3_IN_GGG3(x1, x2, x3)  =  SNAKE_3_IN_GGG3(x1, x2, x3)
IF_SNAKE_3_IN_2_GGG5(x1, x2, x3, x4, x5)  =  IF_SNAKE_3_IN_2_GGG4(x1, x2, x3, x5)

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

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

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

REVERSE_3_IN_AGA3(cons_22(Head, Tail), SoFar, Reversed) -> REVERSE_3_IN_AGA3(Tail, cons_22(Head, SoFar), Reversed)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
REVERSE_3_IN_AGA3(x1, x2, x3)  =  REVERSE_3_IN_AGA1(x2)

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

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

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

COIL_IT_2_IN_GG2(cons_22(Line, Lines), even_0) -> IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
COIL_IT_2_IN_GG2(cons_22(Line, Lines), odd_0) -> COIL_IT_2_IN_GG2(Lines, even_0)
IF_COIL_IT_2_IN_2_GG3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> COIL_IT_2_IN_GG2(Lines, odd_0)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
IF_COIL_IT_2_IN_2_GG3(x1, x2, x3)  =  IF_COIL_IT_2_IN_2_GG2(x2, x3)
COIL_IT_2_IN_GG2(x1, x2)  =  COIL_IT_2_IN_GG2(x1, x2)

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

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

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

PART_OF_SNAKE_4_IN_GAAA4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> PART_OF_SNAKE_4_IN_GAAA4(R, Rings, RestSnake, RestRings)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
PART_OF_SNAKE_4_IN_GAAA4(x1, x2, x3, x4)  =  PART_OF_SNAKE_4_IN_GAAA1(x1)

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

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

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

PRODUCE_SNAKE_4_IN_GGAA4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> PRODUCE_SNAKE_4_IN_GGAA4(Rows, Cols, NewInfSnake, Tail)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
IF_PRODUCE_SNAKE_4_IN_1_GGAA7(x1, x2, x3, x4, x5, x6, x7)  =  IF_PRODUCE_SNAKE_4_IN_1_GGAA3(x2, x3, x7)
PRODUCE_SNAKE_4_IN_GGAA4(x1, x2, x3, x4)  =  PRODUCE_SNAKE_4_IN_GGAA2(x1, x2)

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

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

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

INFINITE_SNAKE_3_IN_GAA3(cons_22(A, R), cons_22(A, T), S) -> INFINITE_SNAKE_3_IN_GAA3(R, T, S)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
INFINITE_SNAKE_3_IN_GAA3(x1, x2, x3)  =  INFINITE_SNAKE_3_IN_GAA1(x1)

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

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

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

S2L_2_IN_GA2(s_11(X), cons_22(underscore, Y)) -> S2L_2_IN_GA2(X, Y)

The TRS R consists of the following rules:

test_snake_3_in_ggg3(Pattern, C, R) -> if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_in_ga2(C, Cols))
s2l_2_in_ga2(0_0, nil_0) -> s2l_2_out_ga2(0_0, nil_0)
s2l_2_in_ga2(s_11(X), cons_22(underscore, Y)) -> if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_in_ga2(X, Y))
if_s2l_2_in_1_ga4(X, underscore, Y, s2l_2_out_ga2(X, Y)) -> s2l_2_out_ga2(s_11(X), cons_22(underscore, Y))
if_test_snake_3_in_1_ggg4(Pattern, C, R, s2l_2_out_ga2(C, Cols)) -> if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_in_ga2(R, Rows))
if_test_snake_3_in_2_ggg5(Pattern, C, R, Cols, s2l_2_out_ga2(R, Rows)) -> if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_in_ggg3(Pattern, Cols, Rows))
snake_3_in_ggg3(Pattern, Cols, Rows) -> if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_in_gaa3(Pattern, InfSnake, InfSnake))
infinite_snake_3_in_gaa3(nil_0, S, S) -> infinite_snake_3_out_gaa3(nil_0, S, S)
infinite_snake_3_in_gaa3(cons_22(A, R), cons_22(A, T), S) -> if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_in_gaa3(R, T, S))
if_infinite_snake_3_in_1_gaa5(A, R, T, S, infinite_snake_3_out_gaa3(R, T, S)) -> infinite_snake_3_out_gaa3(cons_22(A, R), cons_22(A, T), S)
if_snake_3_in_1_ggg4(Pattern, Cols, Rows, infinite_snake_3_out_gaa3(Pattern, InfSnake, InfSnake)) -> if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_in_ggaa4(Rows, Cols, InfSnake, Snake))
produce_snake_4_in_ggaa4(nil_0, underscore1, underscore2, nil_0) -> produce_snake_4_out_ggaa4(nil_0, underscore1, underscore2, nil_0)
produce_snake_4_in_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail)) -> if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_in_gaaa4(Cols, InfSnake, NewInfSnake, Part))
part_of_snake_4_in_gaaa4(nil_0, RestSnake, RestSnake, nil_0) -> part_of_snake_4_out_gaaa4(nil_0, RestSnake, RestSnake, nil_0)
part_of_snake_4_in_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings)) -> if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_in_gaaa4(R, Rings, RestSnake, RestRings))
if_part_of_snake_4_in_1_gaaa7(underscore4, R, Ring, Rings, RestSnake, RestRings, part_of_snake_4_out_gaaa4(R, Rings, RestSnake, RestRings)) -> part_of_snake_4_out_gaaa4(cons_22(underscore4, R), cons_22(Ring, Rings), RestSnake, cons_22(Ring, RestRings))
if_produce_snake_4_in_1_ggaa7(underscore3, Rows, Cols, InfSnake, Part, Tail, part_of_snake_4_out_gaaa4(Cols, InfSnake, NewInfSnake, Part)) -> if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_in_ggaa4(Rows, Cols, NewInfSnake, Tail))
if_produce_snake_4_in_2_ggaa8(underscore3, Rows, Cols, InfSnake, Part, Tail, NewInfSnake, produce_snake_4_out_ggaa4(Rows, Cols, NewInfSnake, Tail)) -> produce_snake_4_out_ggaa4(cons_22(underscore3, Rows), Cols, InfSnake, cons_22(Part, Tail))
if_snake_3_in_2_ggg5(Pattern, Cols, Rows, InfSnake, produce_snake_4_out_ggaa4(Rows, Cols, InfSnake, Snake)) -> if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_in_gg2(Snake, odd_0))
coil_it_2_in_gg2(nil_0, underscore5) -> coil_it_2_out_gg2(nil_0, underscore5)
coil_it_2_in_gg2(cons_22(Line, Lines), odd_0) -> if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_in_gg2(Lines, even_0))
coil_it_2_in_gg2(cons_22(Line, Lines), even_0) -> if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_in_aa2(Line, Line1))
reverse2_2_in_aa2(List, Reversed) -> if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_in_aga3(List, nil_0, Reversed))
reverse_3_in_aga3(nil_0, Reversed, Reversed) -> reverse_3_out_aga3(nil_0, Reversed, Reversed)
reverse_3_in_aga3(cons_22(Head, Tail), SoFar, Reversed) -> if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_in_aga3(Tail, cons_22(Head, SoFar), Reversed))
if_reverse_3_in_1_aga5(Head, Tail, SoFar, Reversed, reverse_3_out_aga3(Tail, cons_22(Head, SoFar), Reversed)) -> reverse_3_out_aga3(cons_22(Head, Tail), SoFar, Reversed)
if_reverse2_2_in_1_aa3(List, Reversed, reverse_3_out_aga3(List, nil_0, Reversed)) -> reverse2_2_out_aa2(List, Reversed)
if_coil_it_2_in_2_gg3(Line, Lines, reverse2_2_out_aa2(Line, Line1)) -> if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_in_gg2(Lines, odd_0))
if_coil_it_2_in_3_gg3(Line, Lines, coil_it_2_out_gg2(Lines, odd_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), even_0)
if_coil_it_2_in_1_gg3(Line, Lines, coil_it_2_out_gg2(Lines, even_0)) -> coil_it_2_out_gg2(cons_22(Line, Lines), odd_0)
if_snake_3_in_3_ggg5(Pattern, Cols, Rows, Snake, coil_it_2_out_gg2(Snake, odd_0)) -> snake_3_out_ggg3(Pattern, Cols, Rows)
if_test_snake_3_in_3_ggg6(Pattern, C, R, Cols, Rows, snake_3_out_ggg3(Pattern, Cols, Rows)) -> test_snake_3_out_ggg3(Pattern, C, R)

The argument filtering Pi contains the following mapping:
test_snake_3_in_ggg3(x1, x2, x3)  =  test_snake_3_in_ggg3(x1, x2, x3)
0_0  =  0_0
nil_0  =  nil_0
s_11(x1)  =  s_11(x1)
cons_22(x1, x2)  =  cons_21(x2)
odd_0  =  odd_0
even_0  =  even_0
if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_test_snake_3_in_1_ggg4(x1, x2, x3, x4)
s2l_2_in_ga2(x1, x2)  =  s2l_2_in_ga1(x1)
s2l_2_out_ga2(x1, x2)  =  s2l_2_out_ga2(x1, x2)
if_s2l_2_in_1_ga4(x1, x2, x3, x4)  =  if_s2l_2_in_1_ga2(x1, x4)
if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_test_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)
if_test_snake_3_in_3_ggg6(x1, x2, x3, x4, x5, x6)  =  if_test_snake_3_in_3_ggg4(x1, x2, x3, x6)
snake_3_in_ggg3(x1, x2, x3)  =  snake_3_in_ggg3(x1, x2, x3)
if_snake_3_in_1_ggg4(x1, x2, x3, x4)  =  if_snake_3_in_1_ggg4(x1, x2, x3, x4)
infinite_snake_3_in_gaa3(x1, x2, x3)  =  infinite_snake_3_in_gaa1(x1)
infinite_snake_3_out_gaa3(x1, x2, x3)  =  infinite_snake_3_out_gaa1(x1)
if_infinite_snake_3_in_1_gaa5(x1, x2, x3, x4, x5)  =  if_infinite_snake_3_in_1_gaa2(x2, x5)
if_snake_3_in_2_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_2_ggg4(x1, x2, x3, x5)
produce_snake_4_in_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_in_ggaa2(x1, x2)
produce_snake_4_out_ggaa4(x1, x2, x3, x4)  =  produce_snake_4_out_ggaa3(x1, x2, x4)
if_produce_snake_4_in_1_ggaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_produce_snake_4_in_1_ggaa3(x2, x3, x7)
part_of_snake_4_in_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_in_gaaa1(x1)
part_of_snake_4_out_gaaa4(x1, x2, x3, x4)  =  part_of_snake_4_out_gaaa2(x1, x4)
if_part_of_snake_4_in_1_gaaa7(x1, x2, x3, x4, x5, x6, x7)  =  if_part_of_snake_4_in_1_gaaa2(x2, x7)
if_produce_snake_4_in_2_ggaa8(x1, x2, x3, x4, x5, x6, x7, x8)  =  if_produce_snake_4_in_2_ggaa3(x2, x3, x8)
if_snake_3_in_3_ggg5(x1, x2, x3, x4, x5)  =  if_snake_3_in_3_ggg4(x1, x2, x3, x5)
coil_it_2_in_gg2(x1, x2)  =  coil_it_2_in_gg2(x1, x2)
coil_it_2_out_gg2(x1, x2)  =  coil_it_2_out_gg2(x1, x2)
if_coil_it_2_in_1_gg3(x1, x2, x3)  =  if_coil_it_2_in_1_gg2(x2, x3)
if_coil_it_2_in_2_gg3(x1, x2, x3)  =  if_coil_it_2_in_2_gg2(x2, x3)
reverse2_2_in_aa2(x1, x2)  =  reverse2_2_in_aa
if_reverse2_2_in_1_aa3(x1, x2, x3)  =  if_reverse2_2_in_1_aa1(x3)
reverse_3_in_aga3(x1, x2, x3)  =  reverse_3_in_aga1(x2)
reverse_3_out_aga3(x1, x2, x3)  =  reverse_3_out_aga3(x1, x2, x3)
if_reverse_3_in_1_aga5(x1, x2, x3, x4, x5)  =  if_reverse_3_in_1_aga2(x3, x5)
reverse2_2_out_aa2(x1, x2)  =  reverse2_2_out_aa2(x1, x2)
if_coil_it_2_in_3_gg3(x1, x2, x3)  =  if_coil_it_2_in_3_gg2(x2, x3)
snake_3_out_ggg3(x1, x2, x3)  =  snake_3_out_ggg3(x1, x2, x3)
test_snake_3_out_ggg3(x1, x2, x3)  =  test_snake_3_out_ggg3(x1, x2, x3)
S2L_2_IN_GA2(x1, x2)  =  S2L_2_IN_GA1(x1)

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