(0) Obligation:

Clauses:

queens(Y) :- ','(perm(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y), safe(Y)).
perm([], []).
perm(.(X, Y), .(V, Res)) :- ','(delete(V, .(X, Y), Rest), perm(Rest, Res)).
delete(X, .(X, Y), Y).
delete(X, .(F, T), .(F, R)) :- delete(X, T, R).
safe([]).
safe(.(X, Y)) :- ','(noattack(X, Y, s(0)), safe(Y)).
noattack(X, [], N).
noattack(X, .(F, T), N) :- ','(notEq(X, F), ','(add(F, N, FplusN), ','(notEq(X, FplusN), ','(add(X, N, XplusN), ','(notEq(F, XplusN), noattack(X, T, s(N))))))).
add(0, X, X).
add(s(X), Y, s(Z)) :- add(X, Y, Z).
notEq(0, s(X)).
notEq(s(X), 0).
notEq(s(X), s(Y)) :- notEq(X, Y).

Queries:

queens(a).

(1) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
queens_in: (f)
perm_in: (b,f)
delete_in: (f,b,f)
safe_in: (b)
noattack_in: (b,b,b)
notEq_in: (b,b)
add_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(2) Obligation:

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

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)

(3) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
QUEENS_IN_A(x1)  =  QUEENS_IN_A
U1_A(x1, x2)  =  U1_A(x2)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x5)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x3, x5)
U2_A(x1, x2)  =  U2_A(x1, x2)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)
U15_GG(x1, x2, x3)  =  U15_GG(x3)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)
U14_GGA(x1, x2, x3, x4)  =  U14_GGA(x4)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)
U13_GGG(x1, x2, x3, x4, x5)  =  U13_GGG(x5)
U7_G(x1, x2, x3)  =  U7_G(x3)

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

(4) Obligation:

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

QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
QUEENS_IN_A(x1)  =  QUEENS_IN_A
U1_A(x1, x2)  =  U1_A(x2)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x5)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x3, x5)
U2_A(x1, x2)  =  U2_A(x1, x2)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)
U15_GG(x1, x2, x3)  =  U15_GG(x3)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)
U14_GGA(x1, x2, x3, x4)  =  U14_GGA(x4)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)
U13_GGG(x1, x2, x3, x4, x5)  =  U13_GGG(x5)
U7_G(x1, x2, x3)  =  U7_G(x3)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

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

(6) Complex Obligation (AND)

(7) Obligation:

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

ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(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:

ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(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:

ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)

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:

  • ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 >= 2

(13) TRUE

(14) Obligation:

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

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)

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

(15) UsableRulesProof (EQUIVALENT transformation)

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

(16) Obligation:

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

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

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

(17) PiDPToQDPProof (EQUIVALENT transformation)

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

(18) Obligation:

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

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

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

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

  • NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(20) TRUE

(21) Obligation:

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

U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)

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

(22) UsableRulesProof (EQUIVALENT transformation)

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

(23) Obligation:

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

U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))

The TRS R consists of the following rules:

add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
0  =  0
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)

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

(24) PiDPToQDPProof (SOUND transformation)

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

(25) Obligation:

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

U8_GGG(X, F, T, N, notEq_out_gg) → U9_GGG(X, F, T, N, add_in_gga(F, N))
U9_GGG(X, F, T, N, add_out_gga(FplusN)) → U10_GGG(X, F, T, N, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, notEq_out_gg) → U11_GGG(X, F, T, N, add_in_gga(X, N))
U11_GGG(X, F, T, N, add_out_gga(XplusN)) → U12_GGG(X, T, N, notEq_in_gg(F, XplusN))
U12_GGG(X, T, N, notEq_out_gg) → NOATTACK_IN_GGG(X, T, s(N))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))

The TRS R consists of the following rules:

add_in_gga(0, X) → add_out_gga(X)
add_in_gga(s(X), Y) → U14_gga(add_in_gga(X, Y))
notEq_in_gg(0, s(X)) → notEq_out_gg
notEq_in_gg(s(X), 0) → notEq_out_gg
notEq_in_gg(s(X), s(Y)) → U15_gg(notEq_in_gg(X, Y))
U14_gga(add_out_gga(Z)) → add_out_gga(s(Z))
U15_gg(notEq_out_gg) → notEq_out_gg

The set Q consists of the following terms:

add_in_gga(x0, x1)
notEq_in_gg(x0, x1)
U14_gga(x0)
U15_gg(x0)

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

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

  • U9_GGG(X, F, T, N, add_out_gga(FplusN)) → U10_GGG(X, F, T, N, notEq_in_gg(X, FplusN))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4

  • NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
    The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 3 >= 4

  • U10_GGG(X, F, T, N, notEq_out_gg) → U11_GGG(X, F, T, N, add_in_gga(X, N))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4

  • U8_GGG(X, F, T, N, notEq_out_gg) → U9_GGG(X, F, T, N, add_in_gga(F, N))
    The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 >= 4

  • U11_GGG(X, F, T, N, add_out_gga(XplusN)) → U12_GGG(X, T, N, notEq_in_gg(F, XplusN))
    The graph contains the following edges 1 >= 1, 3 >= 2, 4 >= 3

  • U12_GGG(X, T, N, notEq_out_gg) → NOATTACK_IN_GGG(X, T, s(N))
    The graph contains the following edges 1 >= 1, 2 >= 2

(27) TRUE

(28) Obligation:

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

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)

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

(29) UsableRulesProof (EQUIVALENT transformation)

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

(30) Obligation:

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

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
0  =  0
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)

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

(31) PiDPToQDPProof (SOUND transformation)

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

(32) Obligation:

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

U6_G(Y, noattack_out_ggg) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

noattack_in_ggg(X, [], N) → noattack_out_ggg
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg) → U9_ggg(X, F, T, N, add_in_gga(F, N))
notEq_in_gg(0, s(X)) → notEq_out_gg
notEq_in_gg(s(X), 0) → notEq_out_gg
notEq_in_gg(s(X), s(Y)) → U15_gg(notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(FplusN)) → U10_ggg(X, F, T, N, notEq_in_gg(X, FplusN))
U15_gg(notEq_out_gg) → notEq_out_gg
add_in_gga(0, X) → add_out_gga(X)
add_in_gga(s(X), Y) → U14_gga(add_in_gga(X, Y))
U10_ggg(X, F, T, N, notEq_out_gg) → U11_ggg(X, F, T, N, add_in_gga(X, N))
U14_gga(add_out_gga(Z)) → add_out_gga(s(Z))
U11_ggg(X, F, T, N, add_out_gga(XplusN)) → U12_ggg(X, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, T, N, notEq_out_gg) → U13_ggg(noattack_in_ggg(X, T, s(N)))
U13_ggg(noattack_out_ggg) → noattack_out_ggg

The set Q consists of the following terms:

noattack_in_ggg(x0, x1, x2)
U8_ggg(x0, x1, x2, x3, x4)
notEq_in_gg(x0, x1)
U9_ggg(x0, x1, x2, x3, x4)
U15_gg(x0)
add_in_gga(x0, x1)
U10_ggg(x0, x1, x2, x3, x4)
U14_gga(x0)
U11_ggg(x0, x1, x2, x3, x4)
U12_ggg(x0, x1, x2, x3)
U13_ggg(x0)

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

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

  • SAFE_IN_G(.(X, Y)) → U6_G(Y, noattack_in_ggg(X, Y, s(0)))
    The graph contains the following edges 1 > 1

  • U6_G(Y, noattack_out_ggg) → SAFE_IN_G(Y)
    The graph contains the following edges 1 >= 1

(34) TRUE

(35) Obligation:

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

DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)

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

(36) UsableRulesProof (EQUIVALENT transformation)

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

(37) Obligation:

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

DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)

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

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

(38) PiDPToQDPProof (SOUND transformation)

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

(39) Obligation:

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

DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)

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

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

  • DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)
    The graph contains the following edges 1 > 1

(41) TRUE

(42) Obligation:

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

U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)

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

(43) UsableRulesProof (EQUIVALENT transformation)

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

(44) Obligation:

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

U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))

The TRS R consists of the following rules:

delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)

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

(45) PiDPToQDPProof (SOUND transformation)

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

(46) Obligation:

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

U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))

The TRS R consists of the following rules:

delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1)

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

(47) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)
PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))

Strictly oriented rules of the TRS R:

delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 3 + x1 + x2   
POL(PERM_IN_GA(x1)) = 1 + x1   
POL(U3_GA(x1)) = x1   
POL(U5_aga(x1, x2)) = 3 + x1 + x2   
POL(delete_in_aga(x1)) = x1   
POL(delete_out_aga(x1, x2)) = 2 + x1 + x2   

(48) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1)

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

(49) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(50) TRUE

(51) MRRProof (EQUIVALENT transformation)

By using the rule removal processor [LPAR04] with the following ordering, at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))

Strictly oriented rules of the TRS R:

delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)

Used ordering: Polynomial interpretation [POLO]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(PERM_IN_GA(x1)) = 2 + 2·x1   
POL(U3_GA(x1)) = x1   
POL(U5_aga(x1, x2)) = 2 + 2·x1 + x2   
POL(delete_in_aga(x1)) = 1 + 2·x1   
POL(delete_out_aga(x1, x2)) = 2 + x1 + 2·x2   

(52) Obligation:

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

U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)

The TRS R consists of the following rules:

delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1)

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

(53) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
queens_in: (f)
perm_in: (b,f)
delete_in: (f,b,f)
safe_in: (b)
noattack_in: (b,b,b)
notEq_in: (b,b)
add_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(54) Obligation:

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

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)

(55) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
QUEENS_IN_A(x1)  =  QUEENS_IN_A
U1_A(x1, x2)  =  U1_A(x2)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x2, x5)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x3, x5)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x3, x5)
U2_A(x1, x2)  =  U2_A(x1, x2)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x1, x2, x3)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)
U15_GG(x1, x2, x3)  =  U15_GG(x1, x2, x3)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)
U14_GGA(x1, x2, x3, x4)  =  U14_GGA(x1, x2, x4)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x2, x3, x4, x5)
U13_GGG(x1, x2, x3, x4, x5)  =  U13_GGG(x1, x2, x3, x4, x5)
U7_G(x1, x2, x3)  =  U7_G(x1, x2, x3)

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

(56) Obligation:

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

QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
QUEENS_IN_A(x1)  =  QUEENS_IN_A
U1_A(x1, x2)  =  U1_A(x2)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x2, x5)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x3, x5)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x1, x2, x3, x5)
U2_A(x1, x2)  =  U2_A(x1, x2)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x1, x2, x3)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)
U15_GG(x1, x2, x3)  =  U15_GG(x1, x2, x3)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)
U14_GGA(x1, x2, x3, x4)  =  U14_GGA(x1, x2, x4)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x2, x3, x4, x5)
U13_GGG(x1, x2, x3, x4, x5)  =  U13_GGG(x1, x2, x3, x4, x5)
U7_G(x1, x2, x3)  =  U7_G(x1, x2, x3)

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

(57) DependencyGraphProof (EQUIVALENT transformation)

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

(58) Complex Obligation (AND)

(59) Obligation:

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

ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

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

(60) UsableRulesProof (EQUIVALENT transformation)

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

(61) Obligation:

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

ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

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

(62) PiDPToQDPProof (SOUND transformation)

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

(63) Obligation:

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

ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)

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

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

  • ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)
    The graph contains the following edges 1 > 1, 2 >= 2

(65) TRUE

(66) Obligation:

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

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)

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

(67) UsableRulesProof (EQUIVALENT transformation)

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

(68) Obligation:

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

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

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

(69) PiDPToQDPProof (EQUIVALENT transformation)

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

(70) Obligation:

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

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

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

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

  • NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
    The graph contains the following edges 1 > 1, 2 > 2

(72) TRUE

(73) Obligation:

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

U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x2, x3, x4, x5)

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

(74) UsableRulesProof (EQUIVALENT transformation)

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

(75) Obligation:

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

U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))

The TRS R consists of the following rules:

add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
0  =  0
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x2, x3, x4, x5)

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

(76) PiDPToQDPProof (SOUND transformation)

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

(77) Obligation:

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

U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, add_in_gga(X, N))
U11_GGG(X, F, T, N, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))

The TRS R consists of the following rules:

add_in_gga(0, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y) → U14_gga(X, Y, add_in_gga(X, Y))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U14_gga(X, Y, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))

The set Q consists of the following terms:

add_in_gga(x0, x1)
notEq_in_gg(x0, x1)
U14_gga(x0, x1, x2)
U15_gg(x0, x1, x2)

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

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

  • U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, notEq_in_gg(X, FplusN))
    The graph contains the following edges 1 >= 1, 2 >= 2, 5 > 2, 3 >= 3, 4 >= 4, 5 > 4

  • NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
    The graph contains the following edges 1 >= 1, 2 > 2, 2 > 3, 3 >= 4

  • U10_GGG(X, F, T, N, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, add_in_gga(X, N))
    The graph contains the following edges 1 >= 1, 5 > 1, 2 >= 2, 3 >= 3, 4 >= 4

  • U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N))
    The graph contains the following edges 1 >= 1, 5 > 1, 2 >= 2, 5 > 2, 3 >= 3, 4 >= 4

  • U11_GGG(X, F, T, N, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
    The graph contains the following edges 1 >= 1, 5 > 1, 2 >= 2, 3 >= 3, 4 >= 4, 5 > 4

  • U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
    The graph contains the following edges 1 >= 1, 3 >= 2

(79) TRUE

(80) Obligation:

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

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x1, x2, x3)

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

(81) UsableRulesProof (EQUIVALENT transformation)

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

(82) Obligation:

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

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
0  =  0
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x1, x2, x3)

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

(83) PiDPToQDPProof (SOUND transformation)

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

(84) Obligation:

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

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, notEq_in_gg(X, FplusN))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
add_in_gga(0, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y) → U14_gga(X, Y, add_in_gga(X, Y))
U10_ggg(X, F, T, N, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, add_in_gga(X, N))
U14_gga(X, Y, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U11_ggg(X, F, T, N, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)

The set Q consists of the following terms:

noattack_in_ggg(x0, x1, x2)
U8_ggg(x0, x1, x2, x3, x4)
notEq_in_gg(x0, x1)
U9_ggg(x0, x1, x2, x3, x4)
U15_gg(x0, x1, x2)
add_in_gga(x0, x1)
U10_ggg(x0, x1, x2, x3, x4)
U14_gga(x0, x1, x2)
U11_ggg(x0, x1, x2, x3, x4)
U12_ggg(x0, x1, x2, x3, x4)
U13_ggg(x0, x1, x2, x3, x4)

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

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

  • SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
    The graph contains the following edges 1 > 1, 1 > 2

  • U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
    The graph contains the following edges 2 >= 1, 3 > 1

(86) TRUE

(87) Obligation:

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

DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)

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

(88) UsableRulesProof (EQUIVALENT transformation)

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

(89) Obligation:

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

DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)

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

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

(90) PiDPToQDPProof (SOUND transformation)

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

(91) Obligation:

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

DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)

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

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

  • DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)
    The graph contains the following edges 1 > 1

(93) TRUE

(94) Obligation:

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

U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x1, x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x2, x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x1, x2, x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g(x1)
U6_g(x1, x2, x3)  =  U6_g(x1, x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg(x1, x2, x3)
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg(x1, x2)
U15_gg(x1, x2, x3)  =  U15_gg(x1, x2, x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x1, x2, x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x1, x2, x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x2, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x1, x2, x3, x4, x5)
U7_g(x1, x2, x3)  =  U7_g(x1, x2, x3)
queens_out_a(x1)  =  queens_out_a(x1)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x2, x5)

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

(95) UsableRulesProof (EQUIVALENT transformation)

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

(96) Obligation:

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

U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))

The TRS R consists of the following rules:

delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x2, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x2, x5)

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

(97) PiDPToQDPProof (SOUND transformation)

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

(98) Obligation:

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

U3_GA(X, Y, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest)
PERM_IN_GA(.(X, Y)) → U3_GA(X, Y, delete_in_aga(.(X, Y)))

The TRS R consists of the following rules:

delete_in_aga(.(X, Y)) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(.(F, T)) → U5_aga(F, T, delete_in_aga(T))
U5_aga(F, T, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1, x2)

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