(0) Obligation:

Clauses:

transpose(A, B) :- transpose_aux(A, [], B).
transpose_aux(.(R, Rs), X1, .(C, Cs)) :- ','(row2col(R, .(C, Cs), Cols1, Accm), transpose_aux(Rs, Accm, Cols1)).
transpose_aux([], X, X).
row2col(.(X, Xs), .(.(X, Ys), Cols), .(Ys, Cols1), .([], As)) :- row2col(Xs, Cols, Cols1, As).
row2col([], [], [], []).

Queries:

transpose(g,g).

(1) PrologToDTProblemTransformerProof (SOUND transformation)

Built DT problem from termination graph.

(2) Obligation:

Triples:

row2col14(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) :- row2col14(T78, T80, X150, X151).
p7(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97), T24) :- row2col14(T54, T56, X96, X97).
p7(T23, T25, T26, .(T113, T114), T112, .(T110, T111)) :- ','(row2colc9(T23, T25, T26, .(T113, T114), T112), p7(T110, T113, T114, X202, X203, T111)).
transpose1(.(T23, T24), .(T25, T26)) :- p7(T23, T25, T26, X35, X36, T24).

Clauses:

row2colc14(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) :- row2colc14(T78, T80, X150, X151).
row2colc14([], [], [], []).
qc7(T23, T25, T26, .(T113, T114), T112, .(T110, T111)) :- ','(row2colc9(T23, T25, T26, .(T113, T114), T112), qc7(T110, T113, T114, X202, X203, T111)).
qc7(T23, T25, T26, T121, T121, []) :- row2colc9(T23, T25, T26, T121, T121).
row2colc9(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97)) :- row2colc14(T54, T56, X96, X97).

Afs:

transpose1(x1, x2)  =  transpose1(x1, x2)

(3) TriplesToPiDPProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
transpose1_in: (b,b)
p7_in: (b,b,b,f,f,b)
row2col14_in: (b,b,f,f)
row2colc9_in: (b,b,b,f,f)
row2colc14_in: (b,b,f,f)
Transforming TRIPLES into the following Term Rewriting System:
Pi DP problem:
The TRS P consists of the following rules:

TRANSPOSE1_IN_GG(.(T23, T24), .(T25, T26)) → U5_GG(T23, T24, T25, T26, p7_in_gggaag(T23, T25, T26, X35, X36, T24))
TRANSPOSE1_IN_GG(.(T23, T24), .(T25, T26)) → P7_IN_GGGAAG(T23, T25, T26, X35, X36, T24)
P7_IN_GGGAAG(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97), T24) → U2_GGGAAG(T53, T54, T55, T56, X96, X97, T24, row2col14_in_ggaa(T54, T56, X96, X97))
P7_IN_GGGAAG(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97), T24) → ROW2COL14_IN_GGAA(T54, T56, X96, X97)
ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → U1_GGAA(T77, T78, T79, T80, X150, X151, row2col14_in_ggaa(T78, T80, X150, X151))
ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → ROW2COL14_IN_GGAA(T78, T80, X150, X151)
P7_IN_GGGAAG(T23, T25, T26, .(T113, T114), T112, .(T110, T111)) → U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_in_gggaa(T23, T25, T26, .(T113, T114), T112))
U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → U4_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, p7_in_gggaag(T110, T113, T114, X202, X203, T111))
U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → P7_IN_GGGAAG(T110, T113, T114, X202, X203, T111)

The TRS R consists of the following rules:

row2colc9_in_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97)) → U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_in_ggaa(T54, T56, X96, X97))
row2colc14_in_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_in_ggaa(T78, T80, X150, X151))
row2colc14_in_ggaa([], [], [], []) → row2colc14_out_ggaa([], [], [], [])
U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_out_ggaa(T78, T80, X150, X151)) → row2colc14_out_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151))
U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_out_ggaa(T54, T56, X96, X97)) → row2colc9_out_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
p7_in_gggaag(x1, x2, x3, x4, x5, x6)  =  p7_in_gggaag(x1, x2, x3, x6)
row2col14_in_ggaa(x1, x2, x3, x4)  =  row2col14_in_ggaa(x1, x2)
row2colc9_in_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_in_gggaa(x1, x2, x3)
U11_gggaa(x1, x2, x3, x4, x5, x6, x7)  =  U11_gggaa(x1, x2, x3, x4, x7)
row2colc14_in_ggaa(x1, x2, x3, x4)  =  row2colc14_in_ggaa(x1, x2)
U7_ggaa(x1, x2, x3, x4, x5, x6, x7)  =  U7_ggaa(x1, x2, x3, x4, x7)
[]  =  []
row2colc14_out_ggaa(x1, x2, x3, x4)  =  row2colc14_out_ggaa(x1, x2, x3, x4)
row2colc9_out_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_out_gggaa(x1, x2, x3, x4, x5)
TRANSPOSE1_IN_GG(x1, x2)  =  TRANSPOSE1_IN_GG(x1, x2)
U5_GG(x1, x2, x3, x4, x5)  =  U5_GG(x1, x2, x3, x4, x5)
P7_IN_GGGAAG(x1, x2, x3, x4, x5, x6)  =  P7_IN_GGGAAG(x1, x2, x3, x6)
U2_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U2_GGGAAG(x1, x2, x3, x4, x7, x8)
ROW2COL14_IN_GGAA(x1, x2, x3, x4)  =  ROW2COL14_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5, x6, x7)  =  U1_GGAA(x1, x2, x3, x4, x7)
U3_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_GGGAAG(x1, x2, x3, x7, x8, x9)
U4_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)

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

Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES

(4) Obligation:

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

TRANSPOSE1_IN_GG(.(T23, T24), .(T25, T26)) → U5_GG(T23, T24, T25, T26, p7_in_gggaag(T23, T25, T26, X35, X36, T24))
TRANSPOSE1_IN_GG(.(T23, T24), .(T25, T26)) → P7_IN_GGGAAG(T23, T25, T26, X35, X36, T24)
P7_IN_GGGAAG(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97), T24) → U2_GGGAAG(T53, T54, T55, T56, X96, X97, T24, row2col14_in_ggaa(T54, T56, X96, X97))
P7_IN_GGGAAG(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97), T24) → ROW2COL14_IN_GGAA(T54, T56, X96, X97)
ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → U1_GGAA(T77, T78, T79, T80, X150, X151, row2col14_in_ggaa(T78, T80, X150, X151))
ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → ROW2COL14_IN_GGAA(T78, T80, X150, X151)
P7_IN_GGGAAG(T23, T25, T26, .(T113, T114), T112, .(T110, T111)) → U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_in_gggaa(T23, T25, T26, .(T113, T114), T112))
U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → U4_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, p7_in_gggaag(T110, T113, T114, X202, X203, T111))
U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → P7_IN_GGGAAG(T110, T113, T114, X202, X203, T111)

The TRS R consists of the following rules:

row2colc9_in_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97)) → U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_in_ggaa(T54, T56, X96, X97))
row2colc14_in_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_in_ggaa(T78, T80, X150, X151))
row2colc14_in_ggaa([], [], [], []) → row2colc14_out_ggaa([], [], [], [])
U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_out_ggaa(T78, T80, X150, X151)) → row2colc14_out_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151))
U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_out_ggaa(T54, T56, X96, X97)) → row2colc9_out_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
p7_in_gggaag(x1, x2, x3, x4, x5, x6)  =  p7_in_gggaag(x1, x2, x3, x6)
row2col14_in_ggaa(x1, x2, x3, x4)  =  row2col14_in_ggaa(x1, x2)
row2colc9_in_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_in_gggaa(x1, x2, x3)
U11_gggaa(x1, x2, x3, x4, x5, x6, x7)  =  U11_gggaa(x1, x2, x3, x4, x7)
row2colc14_in_ggaa(x1, x2, x3, x4)  =  row2colc14_in_ggaa(x1, x2)
U7_ggaa(x1, x2, x3, x4, x5, x6, x7)  =  U7_ggaa(x1, x2, x3, x4, x7)
[]  =  []
row2colc14_out_ggaa(x1, x2, x3, x4)  =  row2colc14_out_ggaa(x1, x2, x3, x4)
row2colc9_out_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_out_gggaa(x1, x2, x3, x4, x5)
TRANSPOSE1_IN_GG(x1, x2)  =  TRANSPOSE1_IN_GG(x1, x2)
U5_GG(x1, x2, x3, x4, x5)  =  U5_GG(x1, x2, x3, x4, x5)
P7_IN_GGGAAG(x1, x2, x3, x4, x5, x6)  =  P7_IN_GGGAAG(x1, x2, x3, x6)
U2_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8)  =  U2_GGGAAG(x1, x2, x3, x4, x7, x8)
ROW2COL14_IN_GGAA(x1, x2, x3, x4)  =  ROW2COL14_IN_GGAA(x1, x2)
U1_GGAA(x1, x2, x3, x4, x5, x6, x7)  =  U1_GGAA(x1, x2, x3, x4, x7)
U3_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_GGGAAG(x1, x2, x3, x7, x8, x9)
U4_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U4_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → ROW2COL14_IN_GGAA(T78, T80, X150, X151)

The TRS R consists of the following rules:

row2colc9_in_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97)) → U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_in_ggaa(T54, T56, X96, X97))
row2colc14_in_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_in_ggaa(T78, T80, X150, X151))
row2colc14_in_ggaa([], [], [], []) → row2colc14_out_ggaa([], [], [], [])
U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_out_ggaa(T78, T80, X150, X151)) → row2colc14_out_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151))
U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_out_ggaa(T54, T56, X96, X97)) → row2colc9_out_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
row2colc9_in_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_in_gggaa(x1, x2, x3)
U11_gggaa(x1, x2, x3, x4, x5, x6, x7)  =  U11_gggaa(x1, x2, x3, x4, x7)
row2colc14_in_ggaa(x1, x2, x3, x4)  =  row2colc14_in_ggaa(x1, x2)
U7_ggaa(x1, x2, x3, x4, x5, x6, x7)  =  U7_ggaa(x1, x2, x3, x4, x7)
[]  =  []
row2colc14_out_ggaa(x1, x2, x3, x4)  =  row2colc14_out_ggaa(x1, x2, x3, x4)
row2colc9_out_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_out_gggaa(x1, x2, x3, x4, x5)
ROW2COL14_IN_GGAA(x1, x2, x3, x4)  =  ROW2COL14_IN_GGAA(x1, x2)

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

(8) UsableRulesProof (EQUIVALENT transformation)

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

(9) Obligation:

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

ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → ROW2COL14_IN_GGAA(T78, T80, X150, X151)

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

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

(10) PiDPToQDPProof (SOUND transformation)

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

(11) Obligation:

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

ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80)) → ROW2COL14_IN_GGAA(T78, T80)

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

(12) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • ROW2COL14_IN_GGAA(.(T77, T78), .(.(T77, T79), T80)) → ROW2COL14_IN_GGAA(T78, T80)
    The graph contains the following edges 1 > 1, 2 > 2

(13) YES

(14) Obligation:

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

P7_IN_GGGAAG(T23, T25, T26, .(T113, T114), T112, .(T110, T111)) → U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_in_gggaa(T23, T25, T26, .(T113, T114), T112))
U3_GGGAAG(T23, T25, T26, T113, T114, T112, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → P7_IN_GGGAAG(T110, T113, T114, X202, X203, T111)

The TRS R consists of the following rules:

row2colc9_in_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97)) → U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_in_ggaa(T54, T56, X96, X97))
row2colc14_in_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151)) → U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_in_ggaa(T78, T80, X150, X151))
row2colc14_in_ggaa([], [], [], []) → row2colc14_out_ggaa([], [], [], [])
U7_ggaa(T77, T78, T79, T80, X150, X151, row2colc14_out_ggaa(T78, T80, X150, X151)) → row2colc14_out_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151))
U11_gggaa(T53, T54, T55, T56, X96, X97, row2colc14_out_ggaa(T54, T56, X96, X97)) → row2colc9_out_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
row2colc9_in_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_in_gggaa(x1, x2, x3)
U11_gggaa(x1, x2, x3, x4, x5, x6, x7)  =  U11_gggaa(x1, x2, x3, x4, x7)
row2colc14_in_ggaa(x1, x2, x3, x4)  =  row2colc14_in_ggaa(x1, x2)
U7_ggaa(x1, x2, x3, x4, x5, x6, x7)  =  U7_ggaa(x1, x2, x3, x4, x7)
[]  =  []
row2colc14_out_ggaa(x1, x2, x3, x4)  =  row2colc14_out_ggaa(x1, x2, x3, x4)
row2colc9_out_gggaa(x1, x2, x3, x4, x5)  =  row2colc9_out_gggaa(x1, x2, x3, x4, x5)
P7_IN_GGGAAG(x1, x2, x3, x4, x5, x6)  =  P7_IN_GGGAAG(x1, x2, x3, x6)
U3_GGGAAG(x1, x2, x3, x4, x5, x6, x7, x8, x9)  =  U3_GGGAAG(x1, x2, x3, x7, x8, x9)

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

(15) PiDPToQDPProof (SOUND transformation)

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

(16) Obligation:

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

P7_IN_GGGAAG(T23, T25, T26, .(T110, T111)) → U3_GGGAAG(T23, T25, T26, T110, T111, row2colc9_in_gggaa(T23, T25, T26))
U3_GGGAAG(T23, T25, T26, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → P7_IN_GGGAAG(T110, T113, T114, T111)

The TRS R consists of the following rules:

row2colc9_in_gggaa(.(T53, T54), .(T53, T55), T56) → U11_gggaa(T53, T54, T55, T56, row2colc14_in_ggaa(T54, T56))
row2colc14_in_ggaa(.(T77, T78), .(.(T77, T79), T80)) → U7_ggaa(T77, T78, T79, T80, row2colc14_in_ggaa(T78, T80))
row2colc14_in_ggaa([], []) → row2colc14_out_ggaa([], [], [], [])
U7_ggaa(T77, T78, T79, T80, row2colc14_out_ggaa(T78, T80, X150, X151)) → row2colc14_out_ggaa(.(T77, T78), .(.(T77, T79), T80), .(T79, X150), .([], X151))
U11_gggaa(T53, T54, T55, T56, row2colc14_out_ggaa(T54, T56, X96, X97)) → row2colc9_out_gggaa(.(T53, T54), .(T53, T55), T56, .(T55, X96), .([], X97))

The set Q consists of the following terms:

row2colc9_in_gggaa(x0, x1, x2)
row2colc14_in_ggaa(x0, x1)
U7_ggaa(x0, x1, x2, x3, x4)
U11_gggaa(x0, x1, x2, x3, x4)

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

(17) QDPSizeChangeProof (EQUIVALENT transformation)

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

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

  • U3_GGGAAG(T23, T25, T26, T110, T111, row2colc9_out_gggaa(T23, T25, T26, .(T113, T114), T112)) → P7_IN_GGGAAG(T110, T113, T114, T111)
    The graph contains the following edges 4 >= 1, 6 > 2, 6 > 3, 5 >= 4

  • P7_IN_GGGAAG(T23, T25, T26, .(T110, T111)) → U3_GGGAAG(T23, T25, T26, T110, T111, row2colc9_in_gggaa(T23, T25, T26))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 > 4, 4 > 5

(18) YES