(0) Obligation:

Clauses:

ap1(nil, X, X).
ap1(cons(H, X), Y, cons(H, Z)) :- ap1(X, Y, Z).
ap2(nil, X, X).
ap2(cons(H, X), Y, cons(H, Z)) :- ap2(X, Y, Z).
perm(nil, nil).
perm(Xs, cons(X, Ys)) :- ','(ap1(X1s, cons(X, X2s), Xs), ','(ap2(X1s, X2s, Zs), perm(Zs, Ys))).

Queries:

perm(g,a).

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph.

(2) Obligation:

Clauses:

ap134(nil, T50, X98, cons(T50, X98)).
ap134(cons(X118, X119), T58, X120, cons(X118, T57)) :- ap134(X119, T58, X120, T57).
perm19(nil, nil).
perm19(T36, cons(T37, T38)) :- ap134(X75, T37, X76, T36).
perm19(T36, cons(T37, T43)) :- ','(ap134(T41, T37, T42, T36), p35(T41, T42, X77, T43)).
ap244(nil, T71, T71).
ap244(cons(T78, T81), T82, cons(T78, X153)) :- ap244(T81, T82, X153).
p35(T41, T42, X77, T43) :- ap244(T41, T42, X77).
p35(T41, T42, T63, T64) :- ','(ap244(T41, T42, T63), perm19(T63, T64)).
ap218(X58, X58).
perm1(nil, nil).
perm1(cons(T23, X43), cons(T23, T24)) :- ap218(X43, X30).
perm1(cons(T23, T25), cons(T23, T24)) :- ','(ap218(T25, T26), perm19(T26, T24)).
perm1(cons(X178, T90), cons(T91, T92)) :- ap134(X179, T91, X180, T90).
perm1(cons(X178, T90), cons(T91, T97)) :- ','(ap134(T95, T91, T96, T90), p35(cons(X178, T95), T96, X30, T97)).

Queries:

perm1(g,a).

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [LOPSTR]. With regard to the inferred argument filtering the predicates were used in the following modes:
perm1_in: (b,f)
perm19_in: (b,f)
ap134_in: (f,f,f,b)
p35_in: (b,b,f,f)
ap244_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

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

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)

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

PERM1_IN_GA(cons(T23, X43), cons(T23, T24)) → U9_GA(T23, X43, T24, ap218_in_ga(X43, X30))
PERM1_IN_GA(cons(T23, X43), cons(T23, T24)) → AP218_IN_GA(X43, X30)
PERM1_IN_GA(cons(T23, T25), cons(T23, T24)) → U10_GA(T23, T25, T24, ap218_in_ga(T25, T26))
U10_GA(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_GA(T23, T25, T24, perm19_in_ga(T26, T24))
U10_GA(T23, T25, T24, ap218_out_ga(T25, T26)) → PERM19_IN_GA(T26, T24)
PERM19_IN_GA(T36, cons(T37, T38)) → U2_GA(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
PERM19_IN_GA(T36, cons(T37, T38)) → AP134_IN_AAAG(X75, T37, X76, T36)
AP134_IN_AAAG(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_AAAG(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
AP134_IN_AAAG(cons(X118, X119), T58, X120, cons(X118, T57)) → AP134_IN_AAAG(X119, T58, X120, T57)
PERM19_IN_GA(T36, cons(T37, T43)) → U3_GA(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_GA(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_GA(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
U3_GA(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → P35_IN_GGAA(T41, T42, X77, T43)
P35_IN_GGAA(T41, T42, X77, T43) → U6_GGAA(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
P35_IN_GGAA(T41, T42, X77, T43) → AP244_IN_GGA(T41, T42, X77)
AP244_IN_GGA(cons(T78, T81), T82, cons(T78, X153)) → U5_GGA(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
AP244_IN_GGA(cons(T78, T81), T82, cons(T78, X153)) → AP244_IN_GGA(T81, T82, X153)
P35_IN_GGAA(T41, T42, T63, T64) → U7_GGAA(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_GGAA(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_GGAA(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U7_GGAA(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → PERM19_IN_GA(T63, T64)
PERM1_IN_GA(cons(X178, T90), cons(T91, T92)) → U12_GA(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
PERM1_IN_GA(cons(X178, T90), cons(T91, T92)) → AP134_IN_AAAG(X179, T91, X180, T90)
PERM1_IN_GA(cons(X178, T90), cons(T91, T97)) → U13_GA(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_GA(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_GA(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U13_GA(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → P35_IN_GGAA(cons(X178, T95), T96, X30, T97)

The TRS R consists of the following rules:

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)
PERM1_IN_GA(x1, x2)  =  PERM1_IN_GA(x1)
U9_GA(x1, x2, x3, x4)  =  U9_GA(x4)
AP218_IN_GA(x1, x2)  =  AP218_IN_GA(x1)
U10_GA(x1, x2, x3, x4)  =  U10_GA(x4)
U11_GA(x1, x2, x3, x4)  =  U11_GA(x4)
PERM19_IN_GA(x1, x2)  =  PERM19_IN_GA(x1)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
AP134_IN_AAAG(x1, x2, x3, x4)  =  AP134_IN_AAAG(x4)
U1_AAAG(x1, x2, x3, x4, x5, x6)  =  U1_AAAG(x1, x6)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
P35_IN_GGAA(x1, x2, x3, x4)  =  P35_IN_GGAA(x1, x2)
U6_GGAA(x1, x2, x3, x4, x5)  =  U6_GGAA(x5)
AP244_IN_GGA(x1, x2, x3)  =  AP244_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x5)
U7_GGAA(x1, x2, x3, x4, x5)  =  U7_GGAA(x5)
U8_GGAA(x1, x2, x3, x4, x5)  =  U8_GGAA(x3, x5)
U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x5)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x1, x5)
U14_GA(x1, x2, x3, x4, x5)  =  U14_GA(x5)

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

(6) Obligation:

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

PERM1_IN_GA(cons(T23, X43), cons(T23, T24)) → U9_GA(T23, X43, T24, ap218_in_ga(X43, X30))
PERM1_IN_GA(cons(T23, X43), cons(T23, T24)) → AP218_IN_GA(X43, X30)
PERM1_IN_GA(cons(T23, T25), cons(T23, T24)) → U10_GA(T23, T25, T24, ap218_in_ga(T25, T26))
U10_GA(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_GA(T23, T25, T24, perm19_in_ga(T26, T24))
U10_GA(T23, T25, T24, ap218_out_ga(T25, T26)) → PERM19_IN_GA(T26, T24)
PERM19_IN_GA(T36, cons(T37, T38)) → U2_GA(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
PERM19_IN_GA(T36, cons(T37, T38)) → AP134_IN_AAAG(X75, T37, X76, T36)
AP134_IN_AAAG(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_AAAG(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
AP134_IN_AAAG(cons(X118, X119), T58, X120, cons(X118, T57)) → AP134_IN_AAAG(X119, T58, X120, T57)
PERM19_IN_GA(T36, cons(T37, T43)) → U3_GA(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_GA(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_GA(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
U3_GA(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → P35_IN_GGAA(T41, T42, X77, T43)
P35_IN_GGAA(T41, T42, X77, T43) → U6_GGAA(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
P35_IN_GGAA(T41, T42, X77, T43) → AP244_IN_GGA(T41, T42, X77)
AP244_IN_GGA(cons(T78, T81), T82, cons(T78, X153)) → U5_GGA(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
AP244_IN_GGA(cons(T78, T81), T82, cons(T78, X153)) → AP244_IN_GGA(T81, T82, X153)
P35_IN_GGAA(T41, T42, T63, T64) → U7_GGAA(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_GGAA(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_GGAA(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U7_GGAA(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → PERM19_IN_GA(T63, T64)
PERM1_IN_GA(cons(X178, T90), cons(T91, T92)) → U12_GA(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
PERM1_IN_GA(cons(X178, T90), cons(T91, T92)) → AP134_IN_AAAG(X179, T91, X180, T90)
PERM1_IN_GA(cons(X178, T90), cons(T91, T97)) → U13_GA(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_GA(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_GA(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U13_GA(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → P35_IN_GGAA(cons(X178, T95), T96, X30, T97)

The TRS R consists of the following rules:

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)
PERM1_IN_GA(x1, x2)  =  PERM1_IN_GA(x1)
U9_GA(x1, x2, x3, x4)  =  U9_GA(x4)
AP218_IN_GA(x1, x2)  =  AP218_IN_GA(x1)
U10_GA(x1, x2, x3, x4)  =  U10_GA(x4)
U11_GA(x1, x2, x3, x4)  =  U11_GA(x4)
PERM19_IN_GA(x1, x2)  =  PERM19_IN_GA(x1)
U2_GA(x1, x2, x3, x4)  =  U2_GA(x4)
AP134_IN_AAAG(x1, x2, x3, x4)  =  AP134_IN_AAAG(x4)
U1_AAAG(x1, x2, x3, x4, x5, x6)  =  U1_AAAG(x1, x6)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
P35_IN_GGAA(x1, x2, x3, x4)  =  P35_IN_GGAA(x1, x2)
U6_GGAA(x1, x2, x3, x4, x5)  =  U6_GGAA(x5)
AP244_IN_GGA(x1, x2, x3)  =  AP244_IN_GGA(x1, x2)
U5_GGA(x1, x2, x3, x4, x5)  =  U5_GGA(x1, x5)
U7_GGAA(x1, x2, x3, x4, x5)  =  U7_GGAA(x5)
U8_GGAA(x1, x2, x3, x4, x5)  =  U8_GGAA(x3, x5)
U12_GA(x1, x2, x3, x4, x5)  =  U12_GA(x5)
U13_GA(x1, x2, x3, x4, x5)  =  U13_GA(x1, x5)
U14_GA(x1, x2, x3, x4, x5)  =  U14_GA(x5)

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

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 3 SCCs with 18 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

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

AP244_IN_GGA(cons(T78, T81), T82, cons(T78, X153)) → AP244_IN_GGA(T81, T82, X153)

The TRS R consists of the following rules:

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)
AP244_IN_GGA(x1, x2, x3)  =  AP244_IN_GGA(x1, x2)

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

(10) UsableRulesProof (EQUIVALENT transformation)

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

(11) Obligation:

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

AP244_IN_GGA(cons(T78, T81), T82, cons(T78, X153)) → AP244_IN_GGA(T81, T82, X153)

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

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

(12) PiDPToQDPProof (SOUND transformation)

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

(13) Obligation:

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

AP244_IN_GGA(cons(T78, T81), T82) → AP244_IN_GGA(T81, T82)

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

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

  • AP244_IN_GGA(cons(T78, T81), T82) → AP244_IN_GGA(T81, T82)
    The graph contains the following edges 1 > 1, 2 >= 2

(15) YES

(16) Obligation:

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

AP134_IN_AAAG(cons(X118, X119), T58, X120, cons(X118, T57)) → AP134_IN_AAAG(X119, T58, X120, T57)

The TRS R consists of the following rules:

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)
AP134_IN_AAAG(x1, x2, x3, x4)  =  AP134_IN_AAAG(x4)

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

(17) UsableRulesProof (EQUIVALENT transformation)

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

(18) Obligation:

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

AP134_IN_AAAG(cons(X118, X119), T58, X120, cons(X118, T57)) → AP134_IN_AAAG(X119, T58, X120, T57)

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

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

(19) PiDPToQDPProof (SOUND transformation)

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

(20) Obligation:

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

AP134_IN_AAAG(cons(X118, T57)) → AP134_IN_AAAG(T57)

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

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

  • AP134_IN_AAAG(cons(X118, T57)) → AP134_IN_AAAG(T57)
    The graph contains the following edges 1 > 1

(22) YES

(23) Obligation:

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

PERM19_IN_GA(T36, cons(T37, T43)) → U3_GA(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_GA(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → P35_IN_GGAA(T41, T42, X77, T43)
P35_IN_GGAA(T41, T42, T63, T64) → U7_GGAA(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_GGAA(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → PERM19_IN_GA(T63, T64)

The TRS R consists of the following rules:

perm1_in_ga(nil, nil) → perm1_out_ga(nil, nil)
perm1_in_ga(cons(T23, X43), cons(T23, T24)) → U9_ga(T23, X43, T24, ap218_in_ga(X43, X30))
ap218_in_ga(X58, X58) → ap218_out_ga(X58, X58)
U9_ga(T23, X43, T24, ap218_out_ga(X43, X30)) → perm1_out_ga(cons(T23, X43), cons(T23, T24))
perm1_in_ga(cons(T23, T25), cons(T23, T24)) → U10_ga(T23, T25, T24, ap218_in_ga(T25, T26))
U10_ga(T23, T25, T24, ap218_out_ga(T25, T26)) → U11_ga(T23, T25, T24, perm19_in_ga(T26, T24))
perm19_in_ga(nil, nil) → perm19_out_ga(nil, nil)
perm19_in_ga(T36, cons(T37, T38)) → U2_ga(T36, T37, T38, ap134_in_aaag(X75, T37, X76, T36))
ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U2_ga(T36, T37, T38, ap134_out_aaag(X75, T37, X76, T36)) → perm19_out_ga(T36, cons(T37, T38))
perm19_in_ga(T36, cons(T37, T43)) → U3_ga(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_ga(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → U4_ga(T36, T37, T43, p35_in_ggaa(T41, T42, X77, T43))
p35_in_ggaa(T41, T42, X77, T43) → U6_ggaa(T41, T42, X77, T43, ap244_in_gga(T41, T42, X77))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))
U6_ggaa(T41, T42, X77, T43, ap244_out_gga(T41, T42, X77)) → p35_out_ggaa(T41, T42, X77, T43)
p35_in_ggaa(T41, T42, T63, T64) → U7_ggaa(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_ggaa(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → U8_ggaa(T41, T42, T63, T64, perm19_in_ga(T63, T64))
U8_ggaa(T41, T42, T63, T64, perm19_out_ga(T63, T64)) → p35_out_ggaa(T41, T42, T63, T64)
U4_ga(T36, T37, T43, p35_out_ggaa(T41, T42, X77, T43)) → perm19_out_ga(T36, cons(T37, T43))
U11_ga(T23, T25, T24, perm19_out_ga(T26, T24)) → perm1_out_ga(cons(T23, T25), cons(T23, T24))
perm1_in_ga(cons(X178, T90), cons(T91, T92)) → U12_ga(X178, T90, T91, T92, ap134_in_aaag(X179, T91, X180, T90))
U12_ga(X178, T90, T91, T92, ap134_out_aaag(X179, T91, X180, T90)) → perm1_out_ga(cons(X178, T90), cons(T91, T92))
perm1_in_ga(cons(X178, T90), cons(T91, T97)) → U13_ga(X178, T90, T91, T97, ap134_in_aaag(T95, T91, T96, T90))
U13_ga(X178, T90, T91, T97, ap134_out_aaag(T95, T91, T96, T90)) → U14_ga(X178, T90, T91, T97, p35_in_ggaa(cons(X178, T95), T96, X30, T97))
U14_ga(X178, T90, T91, T97, p35_out_ggaa(cons(X178, T95), T96, X30, T97)) → perm1_out_ga(cons(X178, T90), cons(T91, T97))

The argument filtering Pi contains the following mapping:
perm1_in_ga(x1, x2)  =  perm1_in_ga(x1)
nil  =  nil
perm1_out_ga(x1, x2)  =  perm1_out_ga
cons(x1, x2)  =  cons(x1, x2)
U9_ga(x1, x2, x3, x4)  =  U9_ga(x4)
ap218_in_ga(x1, x2)  =  ap218_in_ga(x1)
ap218_out_ga(x1, x2)  =  ap218_out_ga(x2)
U10_ga(x1, x2, x3, x4)  =  U10_ga(x4)
U11_ga(x1, x2, x3, x4)  =  U11_ga(x4)
perm19_in_ga(x1, x2)  =  perm19_in_ga(x1)
perm19_out_ga(x1, x2)  =  perm19_out_ga
U2_ga(x1, x2, x3, x4)  =  U2_ga(x4)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
U3_ga(x1, x2, x3, x4)  =  U3_ga(x4)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
p35_in_ggaa(x1, x2, x3, x4)  =  p35_in_ggaa(x1, x2)
U6_ggaa(x1, x2, x3, x4, x5)  =  U6_ggaa(x5)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
p35_out_ggaa(x1, x2, x3, x4)  =  p35_out_ggaa(x3)
U7_ggaa(x1, x2, x3, x4, x5)  =  U7_ggaa(x5)
U8_ggaa(x1, x2, x3, x4, x5)  =  U8_ggaa(x3, x5)
U12_ga(x1, x2, x3, x4, x5)  =  U12_ga(x5)
U13_ga(x1, x2, x3, x4, x5)  =  U13_ga(x1, x5)
U14_ga(x1, x2, x3, x4, x5)  =  U14_ga(x5)
PERM19_IN_GA(x1, x2)  =  PERM19_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
P35_IN_GGAA(x1, x2, x3, x4)  =  P35_IN_GGAA(x1, x2)
U7_GGAA(x1, x2, x3, x4, x5)  =  U7_GGAA(x5)

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

(24) UsableRulesProof (EQUIVALENT transformation)

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

(25) Obligation:

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

PERM19_IN_GA(T36, cons(T37, T43)) → U3_GA(T36, T37, T43, ap134_in_aaag(T41, T37, T42, T36))
U3_GA(T36, T37, T43, ap134_out_aaag(T41, T37, T42, T36)) → P35_IN_GGAA(T41, T42, X77, T43)
P35_IN_GGAA(T41, T42, T63, T64) → U7_GGAA(T41, T42, T63, T64, ap244_in_gga(T41, T42, T63))
U7_GGAA(T41, T42, T63, T64, ap244_out_gga(T41, T42, T63)) → PERM19_IN_GA(T63, T64)

The TRS R consists of the following rules:

ap134_in_aaag(nil, T50, X98, cons(T50, X98)) → ap134_out_aaag(nil, T50, X98, cons(T50, X98))
ap134_in_aaag(cons(X118, X119), T58, X120, cons(X118, T57)) → U1_aaag(X118, X119, T58, X120, T57, ap134_in_aaag(X119, T58, X120, T57))
ap244_in_gga(nil, T71, T71) → ap244_out_gga(nil, T71, T71)
ap244_in_gga(cons(T78, T81), T82, cons(T78, X153)) → U5_gga(T78, T81, T82, X153, ap244_in_gga(T81, T82, X153))
U1_aaag(X118, X119, T58, X120, T57, ap134_out_aaag(X119, T58, X120, T57)) → ap134_out_aaag(cons(X118, X119), T58, X120, cons(X118, T57))
U5_gga(T78, T81, T82, X153, ap244_out_gga(T81, T82, X153)) → ap244_out_gga(cons(T78, T81), T82, cons(T78, X153))

The argument filtering Pi contains the following mapping:
nil  =  nil
cons(x1, x2)  =  cons(x1, x2)
ap134_in_aaag(x1, x2, x3, x4)  =  ap134_in_aaag(x4)
ap134_out_aaag(x1, x2, x3, x4)  =  ap134_out_aaag(x1, x2, x3)
U1_aaag(x1, x2, x3, x4, x5, x6)  =  U1_aaag(x1, x6)
ap244_in_gga(x1, x2, x3)  =  ap244_in_gga(x1, x2)
ap244_out_gga(x1, x2, x3)  =  ap244_out_gga(x3)
U5_gga(x1, x2, x3, x4, x5)  =  U5_gga(x1, x5)
PERM19_IN_GA(x1, x2)  =  PERM19_IN_GA(x1)
U3_GA(x1, x2, x3, x4)  =  U3_GA(x4)
P35_IN_GGAA(x1, x2, x3, x4)  =  P35_IN_GGAA(x1, x2)
U7_GGAA(x1, x2, x3, x4, x5)  =  U7_GGAA(x5)

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

(26) PiDPToQDPProof (SOUND transformation)

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

(27) Obligation:

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

PERM19_IN_GA(T36) → U3_GA(ap134_in_aaag(T36))
U3_GA(ap134_out_aaag(T41, T37, T42)) → P35_IN_GGAA(T41, T42)
P35_IN_GGAA(T41, T42) → U7_GGAA(ap244_in_gga(T41, T42))
U7_GGAA(ap244_out_gga(T63)) → PERM19_IN_GA(T63)

The TRS R consists of the following rules:

ap134_in_aaag(cons(T50, X98)) → ap134_out_aaag(nil, T50, X98)
ap134_in_aaag(cons(X118, T57)) → U1_aaag(X118, ap134_in_aaag(T57))
ap244_in_gga(nil, T71) → ap244_out_gga(T71)
ap244_in_gga(cons(T78, T81), T82) → U5_gga(T78, ap244_in_gga(T81, T82))
U1_aaag(X118, ap134_out_aaag(X119, T58, X120)) → ap134_out_aaag(cons(X118, X119), T58, X120)
U5_gga(T78, ap244_out_gga(X153)) → ap244_out_gga(cons(T78, X153))

The set Q consists of the following terms:

ap134_in_aaag(x0)
ap244_in_gga(x0, x1)
U1_aaag(x0, x1)
U5_gga(x0, x1)

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

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

PERM19_IN_GA(T36) → U3_GA(ap134_in_aaag(T36))
U3_GA(ap134_out_aaag(T41, T37, T42)) → P35_IN_GGAA(T41, T42)
P35_IN_GGAA(T41, T42) → U7_GGAA(ap244_in_gga(T41, T42))
U7_GGAA(ap244_out_gga(T63)) → PERM19_IN_GA(T63)

Strictly oriented rules of the TRS R:

ap134_in_aaag(cons(T50, X98)) → ap134_out_aaag(nil, T50, X98)
ap244_in_gga(nil, T71) → ap244_out_gga(T71)

Used ordering: Polynomial interpretation [POLO]:

POL(P35_IN_GGAA(x1, x2)) = 4 + x1 + x2   
POL(PERM19_IN_GA(x1)) = 1 + x1   
POL(U1_aaag(x1, x2)) = 6 + x1 + x2   
POL(U3_GA(x1)) = x1   
POL(U5_gga(x1, x2)) = 6 + x1 + x2   
POL(U7_GGAA(x1)) = x1   
POL(ap134_in_aaag(x1)) = x1   
POL(ap134_out_aaag(x1, x2, x3)) = 5 + x1 + x2 + x3   
POL(ap244_in_gga(x1, x2)) = 3 + x1 + x2   
POL(ap244_out_gga(x1)) = 2 + x1   
POL(cons(x1, x2)) = 6 + x1 + x2   
POL(nil) = 0   

(29) Obligation:

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

ap134_in_aaag(cons(X118, T57)) → U1_aaag(X118, ap134_in_aaag(T57))
ap244_in_gga(cons(T78, T81), T82) → U5_gga(T78, ap244_in_gga(T81, T82))
U1_aaag(X118, ap134_out_aaag(X119, T58, X120)) → ap134_out_aaag(cons(X118, X119), T58, X120)
U5_gga(T78, ap244_out_gga(X153)) → ap244_out_gga(cons(T78, X153))

The set Q consists of the following terms:

ap134_in_aaag(x0)
ap244_in_gga(x0, x1)
U1_aaag(x0, x1)
U5_gga(x0, x1)

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

(30) PisEmptyProof (EQUIVALENT transformation)

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

(31) YES