0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDPToQDPProof (⇐)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 TRUE
↳14 PiDP
↳15 UsableRulesProof (⇔)
↳16 PiDP
↳17 PiDPToQDPProof (⇐)
↳18 QDP
↳19 QDPOrderProof (⇔)
↳20 QDP
↳21 DependencyGraphProof (⇔)
↳22 TRUE
↳23 PiDP
↳24 UsableRulesProof (⇔)
↳25 PiDP
↳26 PiDPToQDPProof (⇐)
↳27 QDP
↳28 PiDP
↳29 UsableRulesProof (⇔)
↳30 PiDP
↳31 PrologToPiTRSProof (⇐)
↳32 PiTRS
↳33 DependencyPairsProof (⇔)
↳34 PiDP
↳35 DependencyGraphProof (⇔)
↳36 AND
↳37 PiDP
↳38 UsableRulesProof (⇔)
↳39 PiDP
↳40 PiDPToQDPProof (⇐)
↳41 QDP
↳42 QDPSizeChangeProof (⇔)
↳43 TRUE
↳44 PiDP
↳45 UsableRulesProof (⇔)
↳46 PiDP
↳47 PiDPToQDPProof (⇐)
↳48 QDP
↳49 QDPOrderProof (⇔)
↳50 QDP
↳51 DependencyGraphProof (⇔)
↳52 TRUE
↳53 PiDP
↳54 UsableRulesProof (⇔)
↳55 PiDP
↳56 PiDPToQDPProof (⇐)
↳57 QDP
↳58 QDPOrderProof (⇔)
↳59 QDP
↳60 DependencyGraphProof (⇔)
↳61 TRUE
↳62 PiDP
↳63 UsableRulesProof (⇔)
↳64 PiDP
↳65 PiDPToQDPProof (⇐)
↳66 QDP
↳67 QDPSizeChangeProof (⇔)
↳68 TRUE
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
SHAPES_IN_GA(Matrix, N) → U1_GA(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
SHAPES_IN_GA(Matrix, N) → VARMAT_IN_GA(Matrix, MatrixWithVars)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → U5_GA(Xs, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → U6_GA(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_GA(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_GA(Matrix, N, unif_matrx_in_g(MatrixWithVars))
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → UNIF_MATRX_IN_G(MatrixWithVars)
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → UNIF_LINES_IN_GG(L1, L2)
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → UNIF_PAIRS_IN_G(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → UNIF_IN_GG(A, B)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → U12_G(A, B, Pairs, unif_pairs_in_g(Pairs))
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_GG(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_G(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
SHAPES_IN_GA(Matrix, N) → U1_GA(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
SHAPES_IN_GA(Matrix, N) → VARMAT_IN_GA(Matrix, MatrixWithVars)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → U5_GA(Xs, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → U6_GA(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_GA(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_GA(Matrix, N, unif_matrx_in_g(MatrixWithVars))
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → UNIF_MATRX_IN_G(MatrixWithVars)
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → UNIF_LINES_IN_GG(L1, L2)
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → UNIF_PAIRS_IN_G(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → UNIF_IN_GG(A, B)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → U12_G(A, B, Pairs, unif_pairs_in_g(Pairs))
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_GG(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_G(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w, w) → unif_out_gg(w, w)
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w) → unif_out_gg(black, w)
unif_in_gg(w, black) → unif_out_gg(w, black)
unif_in_gg(x0, x1)
From the DPs we obtained the following set of size-change graphs:
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg(w, w)
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w) → unif_out_gg(black, w)
unif_in_gg(w, black) → unif_out_gg(w, black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(x0)
U11_g(x0, x1, x2, x3)
unif_in_gg(x0, x1)
U12_g(x0, x1, x2, x3)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
POL(.(x1, x2)) = 1 + x2
POL(U11_g(x1, x2, x3, x4)) = 0
POL(U12_g(x1, x2, x3, x4)) = 0
POL(U9_GG(x1, x2, x3, x4, x5, x6, x7)) = 1 + x3
POL(UNIF_LINES_IN_GG(x1, x2)) = x1
POL([]) = 0
POL(black) = 1
POL(unif_in_gg(x1, x2)) = x1 + x2
POL(unif_out_gg(x1, x2)) = 0
POL(unif_pairs_in_g(x1)) = 0
POL(unif_pairs_out_g(x1)) = 0
POL(w) = 0
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg(w, w)
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w) → unif_out_gg(black, w)
unif_in_gg(w, black) → unif_out_gg(w, black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(x0)
U11_g(x0, x1, x2, x3)
unif_in_gg(x0, x1)
U12_g(x0, x1, x2, x3)
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg(w, w)
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w) → unif_out_gg(black, w)
unif_in_gg(w, black) → unif_out_gg(w, black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_lines_in_gg(x0, x1)
U9_gg(x0, x1, x2, x3, x4, x5, x6)
unif_pairs_in_g(x0)
U10_gg(x0, x1, x2, x3, x4, x5, x6)
U11_g(x0, x1, x2, x3)
unif_in_gg(x0, x1)
U12_g(x0, x1, x2, x3)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
SHAPES_IN_GA(Matrix, N) → U1_GA(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
SHAPES_IN_GA(Matrix, N) → VARMAT_IN_GA(Matrix, MatrixWithVars)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → U5_GA(Xs, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → U6_GA(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_GA(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_GA(Matrix, N, unif_matrx_in_g(MatrixWithVars))
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → UNIF_MATRX_IN_G(MatrixWithVars)
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → UNIF_LINES_IN_GG(L1, L2)
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → UNIF_PAIRS_IN_G(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → UNIF_IN_GG(A, B)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → U12_G(A, B, Pairs, unif_pairs_in_g(Pairs))
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_GG(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_G(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
SHAPES_IN_GA(Matrix, N) → U1_GA(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
SHAPES_IN_GA(Matrix, N) → VARMAT_IN_GA(Matrix, MatrixWithVars)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → U5_GA(Xs, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → U6_GA(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_GA(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_GA(Matrix, N, unif_matrx_in_g(MatrixWithVars))
U1_GA(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → UNIF_MATRX_IN_G(MatrixWithVars)
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → UNIF_LINES_IN_GG(L1, L2)
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → UNIF_PAIRS_IN_G(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → UNIF_IN_GG(A, B)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → U12_G(A, B, Pairs, unif_pairs_in_g(Pairs))
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_GG(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_G(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U11_G(A, B, Pairs, unif_out_gg(A, B)) → UNIF_PAIRS_IN_G(Pairs)
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_G(Pairs, unif_out_gg) → UNIF_PAIRS_IN_G(Pairs)
UNIF_PAIRS_IN_G(.(A, .(B, Pairs))) → U11_G(Pairs, unif_in_gg(A, B))
unif_in_gg(w, w) → unif_out_gg
unif_in_gg(black, black) → unif_out_gg
unif_in_gg(black, w) → unif_out_gg
unif_in_gg(w, black) → unif_out_gg
unif_in_gg(x0, x1)
From the DPs we obtained the following set of size-change graphs:
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
U9_GG(X, L1s, Z, L2s, unif_pairs_out_g) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(X, L1s, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(Pairs, unif_in_gg(A, B))
U11_g(Pairs, unif_out_gg) → U12_g(unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg
unif_in_gg(black, black) → unif_out_gg
unif_in_gg(black, w) → unif_out_gg
unif_in_gg(w, black) → unif_out_gg
U12_g(unif_pairs_out_g) → unif_pairs_out_g
unif_pairs_in_g([]) → unif_pairs_out_g
unif_pairs_in_g(x0)
U11_g(x0, x1)
unif_in_gg(x0, x1)
U12_g(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
UNIF_LINES_IN_GG(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_GG(X, L1s, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
POL(.(x1, x2)) = 1 + x2
POL(U11_g(x1, x2)) = 0
POL(U12_g(x1)) = 0
POL(U9_GG(x1, x2, x3, x4, x5)) = 1 + x2
POL(UNIF_LINES_IN_GG(x1, x2)) = x1
POL([]) = 0
POL(black) = 1
POL(unif_in_gg(x1, x2)) = x1 + x2
POL(unif_out_gg) = 1
POL(unif_pairs_in_g(x1)) = 0
POL(unif_pairs_out_g) = 0
POL(w) = 1
U9_GG(X, L1s, Z, L2s, unif_pairs_out_g) → UNIF_LINES_IN_GG(.(X, L1s), .(Z, L2s))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(Pairs, unif_in_gg(A, B))
U11_g(Pairs, unif_out_gg) → U12_g(unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg
unif_in_gg(black, black) → unif_out_gg
unif_in_gg(black, w) → unif_out_gg
unif_in_gg(w, black) → unif_out_gg
U12_g(unif_pairs_out_g) → unif_pairs_out_g
unif_pairs_in_g([]) → unif_pairs_out_g
unif_pairs_in_g(x0)
U11_g(x0, x1)
unif_in_gg(x0, x1)
U12_g(x0)
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U7_G(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → UNIF_MATRX_IN_G(.(L2, Ls))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
unif_pairs_in_g([]) → unif_pairs_out_g([])
U7_G(L2, Ls, unif_lines_out_gg) → UNIF_MATRX_IN_G(.(L2, Ls))
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(X, L1s, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg
U9_gg(X, L1s, Z, L2s, unif_pairs_out_g) → U10_gg(unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(Pairs, unif_in_gg(A, B))
U10_gg(unif_lines_out_gg) → unif_lines_out_gg
U11_g(Pairs, unif_out_gg) → U12_g(unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg
unif_in_gg(black, black) → unif_out_gg
unif_in_gg(black, w) → unif_out_gg
unif_in_gg(w, black) → unif_out_gg
U12_g(unif_pairs_out_g) → unif_pairs_out_g
unif_pairs_in_g([]) → unif_pairs_out_g
unif_lines_in_gg(x0, x1)
U9_gg(x0, x1, x2, x3, x4)
unif_pairs_in_g(x0)
U10_gg(x0)
U11_g(x0, x1)
unif_in_gg(x0, x1)
U12_g(x0)
The following pairs can be oriented strictly and are deleted.
The remaining pairs can at least be oriented weakly.
UNIF_MATRX_IN_G(.(L1, .(L2, Ls))) → U7_G(L2, Ls, unif_lines_in_gg(L1, L2))
POL(.(x1, x2)) = 1 + x2
POL(U10_gg(x1)) = 0
POL(U11_g(x1, x2)) = 0
POL(U12_g(x1)) = 0
POL(U7_G(x1, x2, x3)) = 1 + x2
POL(U9_gg(x1, x2, x3, x4, x5)) = 0
POL(UNIF_MATRX_IN_G(x1)) = x1
POL([]) = 0
POL(black) = 0
POL(unif_in_gg(x1, x2)) = 1 + x1
POL(unif_lines_in_gg(x1, x2)) = 0
POL(unif_lines_out_gg) = 0
POL(unif_out_gg) = 1
POL(unif_pairs_in_g(x1)) = 0
POL(unif_pairs_out_g) = 0
POL(w) = 1
U7_G(L2, Ls, unif_lines_out_gg) → UNIF_MATRX_IN_G(.(L2, Ls))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(X, L1s, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg
U9_gg(X, L1s, Z, L2s, unif_pairs_out_g) → U10_gg(unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(Pairs, unif_in_gg(A, B))
U10_gg(unif_lines_out_gg) → unif_lines_out_gg
U11_g(Pairs, unif_out_gg) → U12_g(unif_pairs_in_g(Pairs))
unif_in_gg(w, w) → unif_out_gg
unif_in_gg(black, black) → unif_out_gg
unif_in_gg(black, w) → unif_out_gg
unif_in_gg(w, black) → unif_out_gg
U12_g(unif_pairs_out_g) → unif_pairs_out_g
unif_pairs_in_g([]) → unif_pairs_out_g
unif_lines_in_gg(x0, x1)
U9_gg(x0, x1, x2, x3, x4)
unif_pairs_in_g(x0)
U10_gg(x0)
U11_g(x0, x1)
unif_in_gg(x0, x1)
U12_g(x0)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
shapes_in_ga(Matrix, N) → U1_ga(Matrix, N, varmat_in_ga(Matrix, MatrixWithVars))
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U1_ga(Matrix, N, varmat_out_ga(Matrix, MatrixWithVars)) → U2_ga(Matrix, N, unif_matrx_in_g(MatrixWithVars))
unif_matrx_in_g(.(L1, .(L2, Ls))) → U7_g(L1, L2, Ls, unif_lines_in_gg(L1, L2))
unif_lines_in_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s))) → U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_in_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, []))))))))))))))
unif_pairs_in_g([]) → unif_pairs_out_g([])
unif_pairs_in_g(.(A, .(B, Pairs))) → U11_g(A, B, Pairs, unif_in_gg(A, B))
unif_in_gg(w(A), w(A)) → unif_out_gg(w(A), w(A))
unif_in_gg(black, black) → unif_out_gg(black, black)
unif_in_gg(black, w(X5)) → unif_out_gg(black, w(X5))
unif_in_gg(w(X6), black) → unif_out_gg(w(X6), black)
U11_g(A, B, Pairs, unif_out_gg(A, B)) → U12_g(A, B, Pairs, unif_pairs_in_g(Pairs))
U12_g(A, B, Pairs, unif_pairs_out_g(Pairs)) → unif_pairs_out_g(.(A, .(B, Pairs)))
U9_gg(W, X, L1s, Y, Z, L2s, unif_pairs_out_g(.(W, .(X, .(Y, .(Z, .(W, .(Y, .(X, .(Z, .(W, .(Z, .(X, .(Y, [])))))))))))))) → U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_in_gg(.(X, L1s), .(Z, L2s)))
unif_lines_in_gg(.(X3, []), .(X4, [])) → unif_lines_out_gg(.(X3, []), .(X4, []))
U10_gg(W, X, L1s, Y, Z, L2s, unif_lines_out_gg(.(X, L1s), .(Z, L2s))) → unif_lines_out_gg(.(W, .(X, L1s)), .(Y, .(Z, L2s)))
U7_g(L1, L2, Ls, unif_lines_out_gg(L1, L2)) → U8_g(L1, L2, Ls, unif_matrx_in_g(.(L2, Ls)))
unif_matrx_in_g(.(X2, [])) → unif_matrx_out_g(.(X2, []))
U8_g(L1, L2, Ls, unif_matrx_out_g(.(L2, Ls))) → unif_matrx_out_g(.(L1, .(L2, Ls)))
U2_ga(Matrix, N, unif_matrx_out_g(MatrixWithVars)) → shapes_out_ga(Matrix, N)
U3_GA(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → VARMAT_IN_GA(Ls, VLs)
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → U3_GA(L, Ls, VL, VLs, varmat_in_ga(L, VL))
VARMAT_IN_GA(.(L, Ls), .(VL, VLs)) → VARMAT_IN_GA(L, VL)
VARMAT_IN_GA(.(black, Xs), .(black, VXs)) → VARMAT_IN_GA(Xs, VXs)
VARMAT_IN_GA(.(white, Xs), .(w(X1), VXs)) → VARMAT_IN_GA(Xs, VXs)
varmat_in_ga([], []) → varmat_out_ga([], [])
varmat_in_ga(.(L, Ls), .(VL, VLs)) → U3_ga(L, Ls, VL, VLs, varmat_in_ga(L, VL))
varmat_in_ga(.(black, Xs), .(black, VXs)) → U5_ga(Xs, VXs, varmat_in_ga(Xs, VXs))
varmat_in_ga(.(white, Xs), .(w(X1), VXs)) → U6_ga(Xs, X1, VXs, varmat_in_ga(Xs, VXs))
U3_ga(L, Ls, VL, VLs, varmat_out_ga(L, VL)) → U4_ga(L, Ls, VL, VLs, varmat_in_ga(Ls, VLs))
U5_ga(Xs, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(black, Xs), .(black, VXs))
U6_ga(Xs, X1, VXs, varmat_out_ga(Xs, VXs)) → varmat_out_ga(.(white, Xs), .(w(X1), VXs))
U4_ga(L, Ls, VL, VLs, varmat_out_ga(Ls, VLs)) → varmat_out_ga(.(L, Ls), .(VL, VLs))
U3_GA(Ls, varmat_out_ga(VL)) → VARMAT_IN_GA(Ls)
VARMAT_IN_GA(.(L, Ls)) → U3_GA(Ls, varmat_in_ga(L))
VARMAT_IN_GA(.(L, Ls)) → VARMAT_IN_GA(L)
VARMAT_IN_GA(.(black, Xs)) → VARMAT_IN_GA(Xs)
VARMAT_IN_GA(.(white, Xs)) → VARMAT_IN_GA(Xs)
varmat_in_ga([]) → varmat_out_ga([])
varmat_in_ga(.(L, Ls)) → U3_ga(Ls, varmat_in_ga(L))
varmat_in_ga(.(black, Xs)) → U5_ga(varmat_in_ga(Xs))
varmat_in_ga(.(white, Xs)) → U6_ga(varmat_in_ga(Xs))
U3_ga(Ls, varmat_out_ga(VL)) → U4_ga(VL, varmat_in_ga(Ls))
U5_ga(varmat_out_ga(VXs)) → varmat_out_ga(.(black, VXs))
U6_ga(varmat_out_ga(VXs)) → varmat_out_ga(.(w, VXs))
U4_ga(VL, varmat_out_ga(VLs)) → varmat_out_ga(.(VL, VLs))
varmat_in_ga(x0)
U3_ga(x0, x1)
U5_ga(x0)
U6_ga(x0)
U4_ga(x0, x1)
From the DPs we obtained the following set of size-change graphs: