5.71/2.38 YES 5.71/2.40 proof of /export/starexec/sandbox/benchmark/theBenchmark.pl 5.71/2.40 # AProVE Commit ID: 48fb2092695e11cc9f56e44b17a92a5f88ffb256 marcel 20180622 unpublished dirty 5.71/2.40 5.71/2.40 5.71/2.40 Left Termination of the query pattern 5.71/2.40 5.71/2.40 zebra(a,a,a,a,a,a,a) 5.71/2.40 5.71/2.40 w.r.t. the given Prolog program could successfully be proven: 5.71/2.40 5.71/2.40 (0) Prolog 5.71/2.40 (1) PrologToPiTRSProof [SOUND, 37 ms] 5.71/2.40 (2) PiTRS 5.71/2.40 (3) DependencyPairsProof [EQUIVALENT, 81 ms] 5.71/2.40 (4) PiDP 5.71/2.40 (5) DependencyGraphProof [EQUIVALENT, 0 ms] 5.71/2.40 (6) AND 5.71/2.40 (7) PiDP 5.71/2.40 (8) UsableRulesProof [EQUIVALENT, 0 ms] 5.71/2.40 (9) PiDP 5.71/2.40 (10) PiDPToQDPProof [SOUND, 0 ms] 5.71/2.40 (11) QDP 5.71/2.40 (12) QDPSizeChangeProof [EQUIVALENT, 0 ms] 5.71/2.40 (13) YES 5.71/2.40 (14) PiDP 5.71/2.40 (15) UsableRulesProof [EQUIVALENT, 0 ms] 5.71/2.40 (16) PiDP 5.71/2.40 (17) PiDPToQDPProof [SOUND, 0 ms] 5.71/2.40 (18) QDP 5.71/2.40 (19) QDPSizeChangeProof [EQUIVALENT, 0 ms] 5.71/2.40 (20) YES 5.71/2.40 5.71/2.40 5.71/2.40 ---------------------------------------- 5.71/2.40 5.71/2.40 (0) 5.71/2.40 Obligation: 5.71/2.40 Clauses: 5.71/2.40 5.71/2.40 zebra(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) :- ','(eq(Englishman, Red), ','(eq(Spaniard, Dog), ','(eq(Green, Coffee), ','(eq(Ukrainian, Tea), ','(to_the_right(Green, Ivory), ','(eq(Winston, Snails), ','(eq(Kool, Yellow), ','(eq(Milk, third), ','(eq(Norwegian, first), ','(next_to(Fox, Chesterfield), ','(next_to(Horse, Kool), ','(eq(Lucky, Juice), ','(eq(Japanese, Parliament), ','(next_to(Norwegian, Blue), ','(houses(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, [])))))), ','(houses(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, [])))))), ','(houses(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, [])))))), ','(houses(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, [])))))), houses(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, [])))))))))))))))))))))))). 5.71/2.40 houses(Prop) :- domain(Prop, .(first, .(second, .(third, .(fourth, .(fifth, [])))))). 5.71/2.40 domain([], X1). 5.71/2.40 domain(.(X, Rest), Domain) :- ','(select(X, Domain, NewDomain), domain(Rest, NewDomain)). 5.71/2.40 select(X, .(X, R), R). 5.71/2.40 select(X, .(Y, R), .(Y, Rest)) :- select(X, R, Rest). 5.71/2.40 next_to(fifth, fourth). 5.71/2.40 next_to(fourth, fifth). 5.71/2.40 next_to(fourth, third). 5.71/2.40 next_to(third, fourth). 5.71/2.40 next_to(third, second). 5.71/2.40 next_to(second, third). 5.71/2.40 next_to(second, first). 5.71/2.40 next_to(first, second). 5.71/2.40 to_the_right(fifth, fourth). 5.71/2.40 to_the_right(fourth, third). 5.71/2.40 to_the_right(third, second). 5.71/2.40 to_the_right(second, first). 5.71/2.40 eq(X, X). 5.71/2.40 5.71/2.40 5.71/2.40 Query: zebra(a,a,a,a,a,a,a) 5.71/2.40 ---------------------------------------- 5.71/2.40 5.71/2.40 (1) PrologToPiTRSProof (SOUND) 5.71/2.40 We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes: 5.71/2.40 5.71/2.40 zebra_in_7: (f,f,f,f,f,f,f) 5.71/2.40 5.71/2.40 houses_in_1: (b) 5.71/2.40 5.71/2.40 domain_in_2: (b,b) 5.71/2.40 5.71/2.40 select_in_3: (f,b,f) 5.71/2.40 5.71/2.40 Transforming Prolog into the following Term Rewriting System: 5.71/2.40 5.71/2.40 Pi-finite rewrite system: 5.71/2.40 The TRS R consists of the following rules: 5.71/2.40 5.71/2.40 zebra_in_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.40 eq_in_aa(X, X) -> eq_out_aa(X, X) 5.71/2.40 U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.40 U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.40 U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.40 U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.40 to_the_right_in_aa(fifth, fourth) -> to_the_right_out_aa(fifth, fourth) 5.71/2.40 to_the_right_in_aa(fourth, third) -> to_the_right_out_aa(fourth, third) 5.71/2.40 to_the_right_in_aa(third, second) -> to_the_right_out_aa(third, second) 5.71/2.40 to_the_right_in_aa(second, first) -> to_the_right_out_aa(second, first) 5.71/2.40 U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.40 U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.40 U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.40 eq_in_ag(X, X) -> eq_out_ag(X, X) 5.71/2.40 U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.40 U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.40 next_to_in_aa(fifth, fourth) -> next_to_out_aa(fifth, fourth) 5.71/2.40 next_to_in_aa(fourth, fifth) -> next_to_out_aa(fourth, fifth) 5.71/2.40 next_to_in_aa(fourth, third) -> next_to_out_aa(fourth, third) 5.71/2.40 next_to_in_aa(third, fourth) -> next_to_out_aa(third, fourth) 5.71/2.40 next_to_in_aa(third, second) -> next_to_out_aa(third, second) 5.71/2.40 next_to_in_aa(second, third) -> next_to_out_aa(second, third) 5.71/2.40 next_to_in_aa(second, first) -> next_to_out_aa(second, first) 5.71/2.40 next_to_in_aa(first, second) -> next_to_out_aa(first, second) 5.71/2.40 U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.40 U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.40 U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.40 U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.40 next_to_in_ga(fifth, fourth) -> next_to_out_ga(fifth, fourth) 5.71/2.40 next_to_in_ga(fourth, fifth) -> next_to_out_ga(fourth, fifth) 5.71/2.40 next_to_in_ga(fourth, third) -> next_to_out_ga(fourth, third) 5.71/2.40 next_to_in_ga(third, fourth) -> next_to_out_ga(third, fourth) 5.71/2.40 next_to_in_ga(third, second) -> next_to_out_ga(third, second) 5.71/2.40 next_to_in_ga(second, third) -> next_to_out_ga(second, third) 5.71/2.40 next_to_in_ga(second, first) -> next_to_out_ga(second, first) 5.71/2.40 next_to_in_ga(first, second) -> next_to_out_ga(first, second) 5.71/2.40 U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.40 houses_in_g(Prop) -> U20_g(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.40 domain_in_gg([], X1) -> domain_out_gg([], X1) 5.71/2.40 domain_in_gg(.(X, Rest), Domain) -> U21_gg(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.40 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.40 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.40 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.40 U21_gg(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_gg(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.40 U22_gg(X, Rest, Domain, domain_out_gg(Rest, NewDomain)) -> domain_out_gg(.(X, Rest), Domain) 5.71/2.40 U20_g(Prop, domain_out_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) -> houses_out_g(Prop) 5.71/2.40 U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.40 U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.40 U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.40 U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.40 U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_out_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) -> zebra_out_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) 5.71/2.40 5.71/2.40 The argument filtering Pi contains the following mapping: 5.71/2.40 zebra_in_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_in_aaaaaaa 5.71/2.40 5.71/2.40 U1_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U1_aaaaaaa(x8) 5.71/2.40 5.71/2.40 eq_in_aa(x1, x2) = eq_in_aa 5.71/2.40 5.71/2.40 eq_out_aa(x1, x2) = eq_out_aa 5.71/2.40 5.71/2.40 U2_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_aaaaaaa(x9) 5.71/2.40 5.71/2.40 U3_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_aaaaaaa(x10) 5.71/2.40 5.71/2.40 U4_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_aaaaaaa(x12) 5.71/2.40 5.71/2.40 U5_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_aaaaaaa(x13) 5.71/2.40 5.71/2.40 to_the_right_in_aa(x1, x2) = to_the_right_in_aa 5.71/2.40 5.71/2.40 to_the_right_out_aa(x1, x2) = to_the_right_out_aa(x1, x2) 5.71/2.40 5.71/2.40 U6_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_aaaaaaa(x14) 5.71/2.40 5.71/2.40 U7_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_aaaaaaa(x16) 5.71/2.40 5.71/2.40 U8_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_aaaaaaa(x18) 5.71/2.40 5.71/2.40 eq_in_ag(x1, x2) = eq_in_ag(x2) 5.71/2.40 5.71/2.40 eq_out_ag(x1, x2) = eq_out_ag(x1, x2) 5.71/2.40 5.71/2.40 third = third 5.71/2.40 5.71/2.40 U9_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_aaaaaaa(x19) 5.71/2.40 5.71/2.40 first = first 5.71/2.40 5.71/2.40 U10_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_aaaaaaa(x5, x19) 5.71/2.40 5.71/2.40 next_to_in_aa(x1, x2) = next_to_in_aa 5.71/2.40 5.71/2.40 next_to_out_aa(x1, x2) = next_to_out_aa(x1, x2) 5.71/2.40 5.71/2.40 U11_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 U12_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_aaaaaaa(x5, x22) 5.71/2.40 5.71/2.40 U13_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_aaaaaaa(x5, x24) 5.71/2.40 5.71/2.40 U14_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_aaaaaaa(x5, x25) 5.71/2.40 5.71/2.40 next_to_in_ga(x1, x2) = next_to_in_ga(x1) 5.71/2.40 5.71/2.40 fifth = fifth 5.71/2.40 5.71/2.40 next_to_out_ga(x1, x2) = next_to_out_ga(x1, x2) 5.71/2.40 5.71/2.40 fourth = fourth 5.71/2.40 5.71/2.40 second = second 5.71/2.40 5.71/2.40 U15_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 houses_in_g(x1) = houses_in_g(x1) 5.71/2.40 5.71/2.40 .(x1, x2) = .(x2) 5.71/2.40 5.71/2.40 U20_g(x1, x2) = U20_g(x1, x2) 5.71/2.40 5.71/2.40 domain_in_gg(x1, x2) = domain_in_gg(x1, x2) 5.71/2.40 5.71/2.40 [] = [] 5.71/2.40 5.71/2.40 domain_out_gg(x1, x2) = domain_out_gg(x1, x2) 5.71/2.40 5.71/2.40 U21_gg(x1, x2, x3, x4) = U21_gg(x2, x3, x4) 5.71/2.40 5.71/2.40 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.40 5.71/2.40 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.40 5.71/2.40 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.40 5.71/2.40 U22_gg(x1, x2, x3, x4) = U22_gg(x2, x3, x4) 5.71/2.40 5.71/2.40 houses_out_g(x1) = houses_out_g(x1) 5.71/2.40 5.71/2.40 U16_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 U17_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_aaaaaaa(x5, x17) 5.71/2.40 5.71/2.40 U18_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_aaaaaaa(x5, x12) 5.71/2.40 5.71/2.40 U19_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U19_aaaaaaa(x5, x8) 5.71/2.40 5.71/2.40 zebra_out_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_out_aaaaaaa(x5) 5.71/2.40 5.71/2.40 5.71/2.40 5.71/2.40 5.71/2.40 5.71/2.40 Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog 5.71/2.40 5.71/2.40 5.71/2.40 5.71/2.40 ---------------------------------------- 5.71/2.40 5.71/2.40 (2) 5.71/2.40 Obligation: 5.71/2.40 Pi-finite rewrite system: 5.71/2.40 The TRS R consists of the following rules: 5.71/2.40 5.71/2.40 zebra_in_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.40 eq_in_aa(X, X) -> eq_out_aa(X, X) 5.71/2.40 U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.40 U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.40 U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.40 U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.40 to_the_right_in_aa(fifth, fourth) -> to_the_right_out_aa(fifth, fourth) 5.71/2.40 to_the_right_in_aa(fourth, third) -> to_the_right_out_aa(fourth, third) 5.71/2.40 to_the_right_in_aa(third, second) -> to_the_right_out_aa(third, second) 5.71/2.40 to_the_right_in_aa(second, first) -> to_the_right_out_aa(second, first) 5.71/2.40 U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.40 U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.40 U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.40 eq_in_ag(X, X) -> eq_out_ag(X, X) 5.71/2.40 U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.40 U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.40 next_to_in_aa(fifth, fourth) -> next_to_out_aa(fifth, fourth) 5.71/2.40 next_to_in_aa(fourth, fifth) -> next_to_out_aa(fourth, fifth) 5.71/2.40 next_to_in_aa(fourth, third) -> next_to_out_aa(fourth, third) 5.71/2.40 next_to_in_aa(third, fourth) -> next_to_out_aa(third, fourth) 5.71/2.40 next_to_in_aa(third, second) -> next_to_out_aa(third, second) 5.71/2.40 next_to_in_aa(second, third) -> next_to_out_aa(second, third) 5.71/2.40 next_to_in_aa(second, first) -> next_to_out_aa(second, first) 5.71/2.40 next_to_in_aa(first, second) -> next_to_out_aa(first, second) 5.71/2.40 U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.40 U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.40 U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.40 U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.40 next_to_in_ga(fifth, fourth) -> next_to_out_ga(fifth, fourth) 5.71/2.40 next_to_in_ga(fourth, fifth) -> next_to_out_ga(fourth, fifth) 5.71/2.40 next_to_in_ga(fourth, third) -> next_to_out_ga(fourth, third) 5.71/2.40 next_to_in_ga(third, fourth) -> next_to_out_ga(third, fourth) 5.71/2.40 next_to_in_ga(third, second) -> next_to_out_ga(third, second) 5.71/2.40 next_to_in_ga(second, third) -> next_to_out_ga(second, third) 5.71/2.40 next_to_in_ga(second, first) -> next_to_out_ga(second, first) 5.71/2.40 next_to_in_ga(first, second) -> next_to_out_ga(first, second) 5.71/2.40 U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.40 houses_in_g(Prop) -> U20_g(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.40 domain_in_gg([], X1) -> domain_out_gg([], X1) 5.71/2.40 domain_in_gg(.(X, Rest), Domain) -> U21_gg(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.40 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.40 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.40 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.40 U21_gg(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_gg(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.40 U22_gg(X, Rest, Domain, domain_out_gg(Rest, NewDomain)) -> domain_out_gg(.(X, Rest), Domain) 5.71/2.40 U20_g(Prop, domain_out_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) -> houses_out_g(Prop) 5.71/2.40 U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.40 U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.40 U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.40 U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.40 U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_out_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) -> zebra_out_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) 5.71/2.40 5.71/2.40 The argument filtering Pi contains the following mapping: 5.71/2.40 zebra_in_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_in_aaaaaaa 5.71/2.40 5.71/2.40 U1_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U1_aaaaaaa(x8) 5.71/2.40 5.71/2.40 eq_in_aa(x1, x2) = eq_in_aa 5.71/2.40 5.71/2.40 eq_out_aa(x1, x2) = eq_out_aa 5.71/2.40 5.71/2.40 U2_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_aaaaaaa(x9) 5.71/2.40 5.71/2.40 U3_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_aaaaaaa(x10) 5.71/2.40 5.71/2.40 U4_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_aaaaaaa(x12) 5.71/2.40 5.71/2.40 U5_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_aaaaaaa(x13) 5.71/2.40 5.71/2.40 to_the_right_in_aa(x1, x2) = to_the_right_in_aa 5.71/2.40 5.71/2.40 to_the_right_out_aa(x1, x2) = to_the_right_out_aa(x1, x2) 5.71/2.40 5.71/2.40 U6_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_aaaaaaa(x14) 5.71/2.40 5.71/2.40 U7_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_aaaaaaa(x16) 5.71/2.40 5.71/2.40 U8_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_aaaaaaa(x18) 5.71/2.40 5.71/2.40 eq_in_ag(x1, x2) = eq_in_ag(x2) 5.71/2.40 5.71/2.40 eq_out_ag(x1, x2) = eq_out_ag(x1, x2) 5.71/2.40 5.71/2.40 third = third 5.71/2.40 5.71/2.40 U9_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_aaaaaaa(x19) 5.71/2.40 5.71/2.40 first = first 5.71/2.40 5.71/2.40 U10_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_aaaaaaa(x5, x19) 5.71/2.40 5.71/2.40 next_to_in_aa(x1, x2) = next_to_in_aa 5.71/2.40 5.71/2.40 next_to_out_aa(x1, x2) = next_to_out_aa(x1, x2) 5.71/2.40 5.71/2.40 U11_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 U12_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_aaaaaaa(x5, x22) 5.71/2.40 5.71/2.40 U13_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_aaaaaaa(x5, x24) 5.71/2.40 5.71/2.40 U14_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_aaaaaaa(x5, x25) 5.71/2.40 5.71/2.40 next_to_in_ga(x1, x2) = next_to_in_ga(x1) 5.71/2.40 5.71/2.40 fifth = fifth 5.71/2.40 5.71/2.40 next_to_out_ga(x1, x2) = next_to_out_ga(x1, x2) 5.71/2.40 5.71/2.40 fourth = fourth 5.71/2.40 5.71/2.40 second = second 5.71/2.40 5.71/2.40 U15_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 houses_in_g(x1) = houses_in_g(x1) 5.71/2.40 5.71/2.40 .(x1, x2) = .(x2) 5.71/2.40 5.71/2.40 U20_g(x1, x2) = U20_g(x1, x2) 5.71/2.40 5.71/2.40 domain_in_gg(x1, x2) = domain_in_gg(x1, x2) 5.71/2.40 5.71/2.40 [] = [] 5.71/2.40 5.71/2.40 domain_out_gg(x1, x2) = domain_out_gg(x1, x2) 5.71/2.40 5.71/2.40 U21_gg(x1, x2, x3, x4) = U21_gg(x2, x3, x4) 5.71/2.40 5.71/2.40 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.40 5.71/2.40 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.40 5.71/2.40 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.40 5.71/2.40 U22_gg(x1, x2, x3, x4) = U22_gg(x2, x3, x4) 5.71/2.40 5.71/2.40 houses_out_g(x1) = houses_out_g(x1) 5.71/2.40 5.71/2.40 U16_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 U17_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_aaaaaaa(x5, x17) 5.71/2.40 5.71/2.40 U18_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_aaaaaaa(x5, x12) 5.71/2.40 5.71/2.40 U19_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U19_aaaaaaa(x5, x8) 5.71/2.40 5.71/2.40 zebra_out_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_out_aaaaaaa(x5) 5.71/2.40 5.71/2.40 5.71/2.40 5.71/2.40 ---------------------------------------- 5.71/2.40 5.71/2.40 (3) DependencyPairsProof (EQUIVALENT) 5.71/2.40 Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem: 5.71/2.40 Pi DP problem: 5.71/2.40 The TRS P consists of the following rules: 5.71/2.40 5.71/2.40 ZEBRA_IN_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.40 ZEBRA_IN_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> EQ_IN_AA(Englishman, Red) 5.71/2.40 U1_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.40 U1_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> EQ_IN_AA(Spaniard, Dog) 5.71/2.40 U2_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.40 U2_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> EQ_IN_AA(Green, Coffee) 5.71/2.40 U3_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.40 U3_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> EQ_IN_AA(Ukrainian, Tea) 5.71/2.40 U4_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.40 U4_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> TO_THE_RIGHT_IN_AA(Green, Ivory) 5.71/2.40 U5_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.40 U5_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> EQ_IN_AA(Winston, Snails) 5.71/2.40 U6_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.40 U6_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> EQ_IN_AA(Kool, Yellow) 5.71/2.40 U7_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.40 U7_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> EQ_IN_AG(Milk, third) 5.71/2.40 U8_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.40 U8_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> EQ_IN_AG(Norwegian, first) 5.71/2.40 U9_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.40 U9_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> NEXT_TO_IN_AA(Fox, Chesterfield) 5.71/2.40 U10_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.40 U10_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> NEXT_TO_IN_AA(Horse, Kool) 5.71/2.40 U11_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.40 U11_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> EQ_IN_AA(Lucky, Juice) 5.71/2.40 U12_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.40 U12_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> EQ_IN_AA(Japanese, Parliament) 5.71/2.40 U13_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.40 U13_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> NEXT_TO_IN_GA(Norwegian, Blue) 5.71/2.40 U14_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.40 U14_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> HOUSES_IN_G(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, [])))))) 5.71/2.40 HOUSES_IN_G(Prop) -> U20_G(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.40 HOUSES_IN_G(Prop) -> DOMAIN_IN_GG(Prop, .(first, .(second, .(third, .(fourth, .(fifth, [])))))) 5.71/2.40 DOMAIN_IN_GG(.(X, Rest), Domain) -> U21_GG(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.40 DOMAIN_IN_GG(.(X, Rest), Domain) -> SELECT_IN_AGA(X, Domain, NewDomain) 5.71/2.40 SELECT_IN_AGA(X, .(Y, R), .(Y, Rest)) -> U23_AGA(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.40 SELECT_IN_AGA(X, .(Y, R), .(Y, Rest)) -> SELECT_IN_AGA(X, R, Rest) 5.71/2.40 U21_GG(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_GG(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.40 U21_GG(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> DOMAIN_IN_GG(Rest, NewDomain) 5.71/2.40 U15_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.40 U15_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> HOUSES_IN_G(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, [])))))) 5.71/2.40 U16_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.40 U16_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> HOUSES_IN_G(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, [])))))) 5.71/2.40 U17_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.40 U17_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> HOUSES_IN_G(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, [])))))) 5.71/2.40 U18_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.40 U18_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> HOUSES_IN_G(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, [])))))) 5.71/2.40 5.71/2.40 The TRS R consists of the following rules: 5.71/2.40 5.71/2.40 zebra_in_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.40 eq_in_aa(X, X) -> eq_out_aa(X, X) 5.71/2.40 U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.40 U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.40 U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.40 U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.40 to_the_right_in_aa(fifth, fourth) -> to_the_right_out_aa(fifth, fourth) 5.71/2.40 to_the_right_in_aa(fourth, third) -> to_the_right_out_aa(fourth, third) 5.71/2.40 to_the_right_in_aa(third, second) -> to_the_right_out_aa(third, second) 5.71/2.40 to_the_right_in_aa(second, first) -> to_the_right_out_aa(second, first) 5.71/2.40 U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.40 U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.40 U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.40 eq_in_ag(X, X) -> eq_out_ag(X, X) 5.71/2.40 U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.40 U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.40 next_to_in_aa(fifth, fourth) -> next_to_out_aa(fifth, fourth) 5.71/2.40 next_to_in_aa(fourth, fifth) -> next_to_out_aa(fourth, fifth) 5.71/2.40 next_to_in_aa(fourth, third) -> next_to_out_aa(fourth, third) 5.71/2.40 next_to_in_aa(third, fourth) -> next_to_out_aa(third, fourth) 5.71/2.40 next_to_in_aa(third, second) -> next_to_out_aa(third, second) 5.71/2.40 next_to_in_aa(second, third) -> next_to_out_aa(second, third) 5.71/2.40 next_to_in_aa(second, first) -> next_to_out_aa(second, first) 5.71/2.40 next_to_in_aa(first, second) -> next_to_out_aa(first, second) 5.71/2.40 U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.40 U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.40 U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.40 U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.40 next_to_in_ga(fifth, fourth) -> next_to_out_ga(fifth, fourth) 5.71/2.40 next_to_in_ga(fourth, fifth) -> next_to_out_ga(fourth, fifth) 5.71/2.40 next_to_in_ga(fourth, third) -> next_to_out_ga(fourth, third) 5.71/2.40 next_to_in_ga(third, fourth) -> next_to_out_ga(third, fourth) 5.71/2.40 next_to_in_ga(third, second) -> next_to_out_ga(third, second) 5.71/2.40 next_to_in_ga(second, third) -> next_to_out_ga(second, third) 5.71/2.40 next_to_in_ga(second, first) -> next_to_out_ga(second, first) 5.71/2.40 next_to_in_ga(first, second) -> next_to_out_ga(first, second) 5.71/2.40 U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.40 houses_in_g(Prop) -> U20_g(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.40 domain_in_gg([], X1) -> domain_out_gg([], X1) 5.71/2.40 domain_in_gg(.(X, Rest), Domain) -> U21_gg(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.40 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.40 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.40 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.40 U21_gg(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_gg(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.40 U22_gg(X, Rest, Domain, domain_out_gg(Rest, NewDomain)) -> domain_out_gg(.(X, Rest), Domain) 5.71/2.40 U20_g(Prop, domain_out_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) -> houses_out_g(Prop) 5.71/2.40 U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.40 U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.40 U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.40 U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.40 U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_out_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) -> zebra_out_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) 5.71/2.40 5.71/2.40 The argument filtering Pi contains the following mapping: 5.71/2.40 zebra_in_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_in_aaaaaaa 5.71/2.40 5.71/2.40 U1_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U1_aaaaaaa(x8) 5.71/2.40 5.71/2.40 eq_in_aa(x1, x2) = eq_in_aa 5.71/2.40 5.71/2.40 eq_out_aa(x1, x2) = eq_out_aa 5.71/2.40 5.71/2.40 U2_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_aaaaaaa(x9) 5.71/2.40 5.71/2.40 U3_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_aaaaaaa(x10) 5.71/2.40 5.71/2.40 U4_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_aaaaaaa(x12) 5.71/2.40 5.71/2.40 U5_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_aaaaaaa(x13) 5.71/2.40 5.71/2.40 to_the_right_in_aa(x1, x2) = to_the_right_in_aa 5.71/2.40 5.71/2.40 to_the_right_out_aa(x1, x2) = to_the_right_out_aa(x1, x2) 5.71/2.40 5.71/2.40 U6_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_aaaaaaa(x14) 5.71/2.40 5.71/2.40 U7_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_aaaaaaa(x16) 5.71/2.40 5.71/2.40 U8_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_aaaaaaa(x18) 5.71/2.40 5.71/2.40 eq_in_ag(x1, x2) = eq_in_ag(x2) 5.71/2.40 5.71/2.40 eq_out_ag(x1, x2) = eq_out_ag(x1, x2) 5.71/2.40 5.71/2.40 third = third 5.71/2.40 5.71/2.40 U9_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_aaaaaaa(x19) 5.71/2.40 5.71/2.40 first = first 5.71/2.40 5.71/2.40 U10_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_aaaaaaa(x5, x19) 5.71/2.40 5.71/2.40 next_to_in_aa(x1, x2) = next_to_in_aa 5.71/2.40 5.71/2.40 next_to_out_aa(x1, x2) = next_to_out_aa(x1, x2) 5.71/2.40 5.71/2.40 U11_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 U12_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_aaaaaaa(x5, x22) 5.71/2.40 5.71/2.40 U13_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_aaaaaaa(x5, x24) 5.71/2.40 5.71/2.40 U14_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_aaaaaaa(x5, x25) 5.71/2.40 5.71/2.40 next_to_in_ga(x1, x2) = next_to_in_ga(x1) 5.71/2.40 5.71/2.40 fifth = fifth 5.71/2.40 5.71/2.40 next_to_out_ga(x1, x2) = next_to_out_ga(x1, x2) 5.71/2.40 5.71/2.40 fourth = fourth 5.71/2.40 5.71/2.40 second = second 5.71/2.40 5.71/2.40 U15_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_aaaaaaa(x5, x21) 5.71/2.40 5.71/2.40 houses_in_g(x1) = houses_in_g(x1) 5.71/2.40 5.71/2.40 .(x1, x2) = .(x2) 5.71/2.40 5.71/2.40 U20_g(x1, x2) = U20_g(x1, x2) 5.71/2.40 5.71/2.40 domain_in_gg(x1, x2) = domain_in_gg(x1, x2) 5.71/2.40 5.71/2.40 [] = [] 5.71/2.40 5.71/2.40 domain_out_gg(x1, x2) = domain_out_gg(x1, x2) 5.71/2.40 5.71/2.40 U21_gg(x1, x2, x3, x4) = U21_gg(x2, x3, x4) 5.71/2.40 5.71/2.40 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.40 5.71/2.40 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.40 5.71/2.40 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.40 5.71/2.40 U22_gg(x1, x2, x3, x4) = U22_gg(x2, x3, x4) 5.71/2.40 5.71/2.40 houses_out_g(x1) = houses_out_g(x1) 5.71/2.40 5.71/2.41 U16_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U17_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_aaaaaaa(x5, x17) 5.71/2.41 5.71/2.41 U18_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_aaaaaaa(x5, x12) 5.71/2.41 5.71/2.41 U19_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U19_aaaaaaa(x5, x8) 5.71/2.41 5.71/2.41 zebra_out_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_out_aaaaaaa(x5) 5.71/2.41 5.71/2.41 ZEBRA_IN_AAAAAAA(x1, x2, x3, x4, x5, x6, x7) = ZEBRA_IN_AAAAAAA 5.71/2.41 5.71/2.41 U1_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8) = U1_AAAAAAA(x8) 5.71/2.41 5.71/2.41 EQ_IN_AA(x1, x2) = EQ_IN_AA 5.71/2.41 5.71/2.41 U2_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_AAAAAAA(x9) 5.71/2.41 5.71/2.41 U3_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_AAAAAAA(x10) 5.71/2.41 5.71/2.41 U4_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_AAAAAAA(x12) 5.71/2.41 5.71/2.41 U5_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_AAAAAAA(x13) 5.71/2.41 5.71/2.41 TO_THE_RIGHT_IN_AA(x1, x2) = TO_THE_RIGHT_IN_AA 5.71/2.41 5.71/2.41 U6_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_AAAAAAA(x14) 5.71/2.41 5.71/2.41 U7_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_AAAAAAA(x16) 5.71/2.41 5.71/2.41 U8_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_AAAAAAA(x18) 5.71/2.41 5.71/2.41 EQ_IN_AG(x1, x2) = EQ_IN_AG(x2) 5.71/2.41 5.71/2.41 U9_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_AAAAAAA(x19) 5.71/2.41 5.71/2.41 U10_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_AAAAAAA(x5, x19) 5.71/2.41 5.71/2.41 NEXT_TO_IN_AA(x1, x2) = NEXT_TO_IN_AA 5.71/2.41 5.71/2.41 U11_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_AAAAAAA(x5, x21) 5.71/2.41 5.71/2.41 U12_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_AAAAAAA(x5, x22) 5.71/2.41 5.71/2.41 U13_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_AAAAAAA(x5, x24) 5.71/2.41 5.71/2.41 U14_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_AAAAAAA(x5, x25) 5.71/2.41 5.71/2.41 NEXT_TO_IN_GA(x1, x2) = NEXT_TO_IN_GA(x1) 5.71/2.41 5.71/2.41 U15_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_AAAAAAA(x5, x21) 5.71/2.41 5.71/2.41 HOUSES_IN_G(x1) = HOUSES_IN_G(x1) 5.71/2.41 5.71/2.41 U20_G(x1, x2) = U20_G(x1, x2) 5.71/2.41 5.71/2.41 DOMAIN_IN_GG(x1, x2) = DOMAIN_IN_GG(x1, x2) 5.71/2.41 5.71/2.41 U21_GG(x1, x2, x3, x4) = U21_GG(x2, x3, x4) 5.71/2.41 5.71/2.41 SELECT_IN_AGA(x1, x2, x3) = SELECT_IN_AGA(x2) 5.71/2.41 5.71/2.41 U23_AGA(x1, x2, x3, x4, x5) = U23_AGA(x3, x5) 5.71/2.41 5.71/2.41 U22_GG(x1, x2, x3, x4) = U22_GG(x2, x3, x4) 5.71/2.41 5.71/2.41 U16_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_AAAAAAA(x5, x21) 5.71/2.41 5.71/2.41 U17_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_AAAAAAA(x5, x17) 5.71/2.41 5.71/2.41 U18_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_AAAAAAA(x5, x12) 5.71/2.41 5.71/2.41 U19_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8) = U19_AAAAAAA(x5, x8) 5.71/2.41 5.71/2.41 5.71/2.41 We have to consider all (P,R,Pi)-chains 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (4) 5.71/2.41 Obligation: 5.71/2.41 Pi DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 ZEBRA_IN_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.41 ZEBRA_IN_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> EQ_IN_AA(Englishman, Red) 5.71/2.41 U1_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.41 U1_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> EQ_IN_AA(Spaniard, Dog) 5.71/2.41 U2_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.41 U2_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> EQ_IN_AA(Green, Coffee) 5.71/2.41 U3_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.41 U3_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> EQ_IN_AA(Ukrainian, Tea) 5.71/2.41 U4_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.41 U4_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> TO_THE_RIGHT_IN_AA(Green, Ivory) 5.71/2.41 U5_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.41 U5_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> EQ_IN_AA(Winston, Snails) 5.71/2.41 U6_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.41 U6_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> EQ_IN_AA(Kool, Yellow) 5.71/2.41 U7_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.41 U7_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> EQ_IN_AG(Milk, third) 5.71/2.41 U8_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.41 U8_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> EQ_IN_AG(Norwegian, first) 5.71/2.41 U9_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.41 U9_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> NEXT_TO_IN_AA(Fox, Chesterfield) 5.71/2.41 U10_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.41 U10_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> NEXT_TO_IN_AA(Horse, Kool) 5.71/2.41 U11_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.41 U11_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> EQ_IN_AA(Lucky, Juice) 5.71/2.41 U12_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.41 U12_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> EQ_IN_AA(Japanese, Parliament) 5.71/2.41 U13_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.41 U13_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> NEXT_TO_IN_GA(Norwegian, Blue) 5.71/2.41 U14_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.41 U14_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> HOUSES_IN_G(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, [])))))) 5.71/2.41 HOUSES_IN_G(Prop) -> U20_G(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.41 HOUSES_IN_G(Prop) -> DOMAIN_IN_GG(Prop, .(first, .(second, .(third, .(fourth, .(fifth, [])))))) 5.71/2.41 DOMAIN_IN_GG(.(X, Rest), Domain) -> U21_GG(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.41 DOMAIN_IN_GG(.(X, Rest), Domain) -> SELECT_IN_AGA(X, Domain, NewDomain) 5.71/2.41 SELECT_IN_AGA(X, .(Y, R), .(Y, Rest)) -> U23_AGA(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.41 SELECT_IN_AGA(X, .(Y, R), .(Y, Rest)) -> SELECT_IN_AGA(X, R, Rest) 5.71/2.41 U21_GG(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_GG(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.41 U21_GG(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> DOMAIN_IN_GG(Rest, NewDomain) 5.71/2.41 U15_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.41 U15_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> HOUSES_IN_G(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, [])))))) 5.71/2.41 U16_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.41 U16_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> HOUSES_IN_G(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, [])))))) 5.71/2.41 U17_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.41 U17_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> HOUSES_IN_G(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, [])))))) 5.71/2.41 U18_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.41 U18_AAAAAAA(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> HOUSES_IN_G(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, [])))))) 5.71/2.41 5.71/2.41 The TRS R consists of the following rules: 5.71/2.41 5.71/2.41 zebra_in_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.41 eq_in_aa(X, X) -> eq_out_aa(X, X) 5.71/2.41 U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.41 U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.41 U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.41 U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.41 to_the_right_in_aa(fifth, fourth) -> to_the_right_out_aa(fifth, fourth) 5.71/2.41 to_the_right_in_aa(fourth, third) -> to_the_right_out_aa(fourth, third) 5.71/2.41 to_the_right_in_aa(third, second) -> to_the_right_out_aa(third, second) 5.71/2.41 to_the_right_in_aa(second, first) -> to_the_right_out_aa(second, first) 5.71/2.41 U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.41 U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.41 U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.41 eq_in_ag(X, X) -> eq_out_ag(X, X) 5.71/2.41 U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.41 U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.41 next_to_in_aa(fifth, fourth) -> next_to_out_aa(fifth, fourth) 5.71/2.41 next_to_in_aa(fourth, fifth) -> next_to_out_aa(fourth, fifth) 5.71/2.41 next_to_in_aa(fourth, third) -> next_to_out_aa(fourth, third) 5.71/2.41 next_to_in_aa(third, fourth) -> next_to_out_aa(third, fourth) 5.71/2.41 next_to_in_aa(third, second) -> next_to_out_aa(third, second) 5.71/2.41 next_to_in_aa(second, third) -> next_to_out_aa(second, third) 5.71/2.41 next_to_in_aa(second, first) -> next_to_out_aa(second, first) 5.71/2.41 next_to_in_aa(first, second) -> next_to_out_aa(first, second) 5.71/2.41 U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.41 U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.41 U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.41 U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.41 next_to_in_ga(fifth, fourth) -> next_to_out_ga(fifth, fourth) 5.71/2.41 next_to_in_ga(fourth, fifth) -> next_to_out_ga(fourth, fifth) 5.71/2.41 next_to_in_ga(fourth, third) -> next_to_out_ga(fourth, third) 5.71/2.41 next_to_in_ga(third, fourth) -> next_to_out_ga(third, fourth) 5.71/2.41 next_to_in_ga(third, second) -> next_to_out_ga(third, second) 5.71/2.41 next_to_in_ga(second, third) -> next_to_out_ga(second, third) 5.71/2.41 next_to_in_ga(second, first) -> next_to_out_ga(second, first) 5.71/2.41 next_to_in_ga(first, second) -> next_to_out_ga(first, second) 5.71/2.41 U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.41 houses_in_g(Prop) -> U20_g(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.41 domain_in_gg([], X1) -> domain_out_gg([], X1) 5.71/2.41 domain_in_gg(.(X, Rest), Domain) -> U21_gg(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.41 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.41 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.41 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.41 U21_gg(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_gg(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.41 U22_gg(X, Rest, Domain, domain_out_gg(Rest, NewDomain)) -> domain_out_gg(.(X, Rest), Domain) 5.71/2.41 U20_g(Prop, domain_out_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) -> houses_out_g(Prop) 5.71/2.41 U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.41 U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.41 U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.41 U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.41 U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_out_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) -> zebra_out_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) 5.71/2.41 5.71/2.41 The argument filtering Pi contains the following mapping: 5.71/2.41 zebra_in_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_in_aaaaaaa 5.71/2.41 5.71/2.41 U1_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U1_aaaaaaa(x8) 5.71/2.41 5.71/2.41 eq_in_aa(x1, x2) = eq_in_aa 5.71/2.41 5.71/2.41 eq_out_aa(x1, x2) = eq_out_aa 5.71/2.41 5.71/2.41 U2_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_aaaaaaa(x9) 5.71/2.41 5.71/2.41 U3_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_aaaaaaa(x10) 5.71/2.41 5.71/2.41 U4_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_aaaaaaa(x12) 5.71/2.41 5.71/2.41 U5_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_aaaaaaa(x13) 5.71/2.41 5.71/2.41 to_the_right_in_aa(x1, x2) = to_the_right_in_aa 5.71/2.41 5.71/2.41 to_the_right_out_aa(x1, x2) = to_the_right_out_aa(x1, x2) 5.71/2.41 5.71/2.41 U6_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_aaaaaaa(x14) 5.71/2.41 5.71/2.41 U7_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_aaaaaaa(x16) 5.71/2.41 5.71/2.41 U8_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_aaaaaaa(x18) 5.71/2.41 5.71/2.41 eq_in_ag(x1, x2) = eq_in_ag(x2) 5.71/2.41 5.71/2.41 eq_out_ag(x1, x2) = eq_out_ag(x1, x2) 5.71/2.41 5.71/2.41 third = third 5.71/2.41 5.71/2.41 U9_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_aaaaaaa(x19) 5.71/2.41 5.71/2.41 first = first 5.71/2.41 5.71/2.41 U10_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_aaaaaaa(x5, x19) 5.71/2.41 5.71/2.41 next_to_in_aa(x1, x2) = next_to_in_aa 5.71/2.41 5.71/2.41 next_to_out_aa(x1, x2) = next_to_out_aa(x1, x2) 5.71/2.41 5.71/2.41 U11_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U12_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_aaaaaaa(x5, x22) 5.71/2.41 5.71/2.41 U13_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_aaaaaaa(x5, x24) 5.71/2.41 5.71/2.41 U14_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_aaaaaaa(x5, x25) 5.71/2.41 5.71/2.41 next_to_in_ga(x1, x2) = next_to_in_ga(x1) 5.71/2.41 5.71/2.41 fifth = fifth 5.71/2.41 5.71/2.41 next_to_out_ga(x1, x2) = next_to_out_ga(x1, x2) 5.71/2.41 5.71/2.41 fourth = fourth 5.71/2.41 5.71/2.41 second = second 5.71/2.41 5.71/2.41 U15_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 houses_in_g(x1) = houses_in_g(x1) 5.71/2.41 5.71/2.41 .(x1, x2) = .(x2) 5.71/2.41 5.71/2.41 U20_g(x1, x2) = U20_g(x1, x2) 5.71/2.41 5.71/2.41 domain_in_gg(x1, x2) = domain_in_gg(x1, x2) 5.71/2.41 5.71/2.41 [] = [] 5.71/2.41 5.71/2.41 domain_out_gg(x1, x2) = domain_out_gg(x1, x2) 5.71/2.41 5.71/2.41 U21_gg(x1, x2, x3, x4) = U21_gg(x2, x3, x4) 5.71/2.41 5.71/2.41 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.41 5.71/2.41 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.41 5.71/2.41 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.41 5.71/2.41 U22_gg(x1, x2, x3, x4) = U22_gg(x2, x3, x4) 5.71/2.41 5.71/2.41 houses_out_g(x1) = houses_out_g(x1) 5.71/2.41 5.71/2.41 U16_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U17_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_aaaaaaa(x5, x17) 5.71/2.41 5.71/2.41 U18_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_aaaaaaa(x5, x12) 5.71/2.41 5.71/2.41 U19_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U19_aaaaaaa(x5, x8) 5.71/2.41 5.71/2.41 zebra_out_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_out_aaaaaaa(x5) 5.71/2.41 5.71/2.41 ZEBRA_IN_AAAAAAA(x1, x2, x3, x4, x5, x6, x7) = ZEBRA_IN_AAAAAAA 5.71/2.41 5.71/2.41 U1_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8) = U1_AAAAAAA(x8) 5.71/2.41 5.71/2.41 EQ_IN_AA(x1, x2) = EQ_IN_AA 5.71/2.41 5.71/2.41 U2_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_AAAAAAA(x9) 5.71/2.41 5.71/2.41 U3_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_AAAAAAA(x10) 5.71/2.41 5.71/2.41 U4_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_AAAAAAA(x12) 5.71/2.41 5.71/2.41 U5_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_AAAAAAA(x13) 5.71/2.41 5.71/2.41 TO_THE_RIGHT_IN_AA(x1, x2) = TO_THE_RIGHT_IN_AA 5.71/2.41 5.71/2.41 U6_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_AAAAAAA(x14) 5.71/2.41 5.71/2.41 U7_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_AAAAAAA(x16) 5.71/2.41 5.71/2.41 U8_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_AAAAAAA(x18) 5.71/2.41 5.71/2.41 EQ_IN_AG(x1, x2) = EQ_IN_AG(x2) 5.71/2.41 5.71/2.41 U9_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_AAAAAAA(x19) 5.71/2.41 5.71/2.41 U10_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_AAAAAAA(x5, x19) 5.71/2.41 5.71/2.41 NEXT_TO_IN_AA(x1, x2) = NEXT_TO_IN_AA 5.71/2.41 5.71/2.41 U11_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_AAAAAAA(x5, x21) 5.71/2.41 5.71/2.41 U12_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_AAAAAAA(x5, x22) 5.71/2.41 5.71/2.41 U13_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_AAAAAAA(x5, x24) 5.71/2.41 5.71/2.41 U14_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_AAAAAAA(x5, x25) 5.71/2.41 5.71/2.41 NEXT_TO_IN_GA(x1, x2) = NEXT_TO_IN_GA(x1) 5.71/2.41 5.71/2.41 U15_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_AAAAAAA(x5, x21) 5.71/2.41 5.71/2.41 HOUSES_IN_G(x1) = HOUSES_IN_G(x1) 5.71/2.41 5.71/2.41 U20_G(x1, x2) = U20_G(x1, x2) 5.71/2.41 5.71/2.41 DOMAIN_IN_GG(x1, x2) = DOMAIN_IN_GG(x1, x2) 5.71/2.41 5.71/2.41 U21_GG(x1, x2, x3, x4) = U21_GG(x2, x3, x4) 5.71/2.41 5.71/2.41 SELECT_IN_AGA(x1, x2, x3) = SELECT_IN_AGA(x2) 5.71/2.41 5.71/2.41 U23_AGA(x1, x2, x3, x4, x5) = U23_AGA(x3, x5) 5.71/2.41 5.71/2.41 U22_GG(x1, x2, x3, x4) = U22_GG(x2, x3, x4) 5.71/2.41 5.71/2.41 U16_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_AAAAAAA(x5, x21) 5.71/2.41 5.71/2.41 U17_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_AAAAAAA(x5, x17) 5.71/2.41 5.71/2.41 U18_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_AAAAAAA(x5, x12) 5.71/2.41 5.71/2.41 U19_AAAAAAA(x1, x2, x3, x4, x5, x6, x7, x8) = U19_AAAAAAA(x5, x8) 5.71/2.41 5.71/2.41 5.71/2.41 We have to consider all (P,R,Pi)-chains 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (5) DependencyGraphProof (EQUIVALENT) 5.71/2.41 The approximation of the Dependency Graph [LOPSTR] contains 2 SCCs with 43 less nodes. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (6) 5.71/2.41 Complex Obligation (AND) 5.71/2.41 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (7) 5.71/2.41 Obligation: 5.71/2.41 Pi DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 SELECT_IN_AGA(X, .(Y, R), .(Y, Rest)) -> SELECT_IN_AGA(X, R, Rest) 5.71/2.41 5.71/2.41 The TRS R consists of the following rules: 5.71/2.41 5.71/2.41 zebra_in_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.41 eq_in_aa(X, X) -> eq_out_aa(X, X) 5.71/2.41 U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.41 U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.41 U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.41 U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.41 to_the_right_in_aa(fifth, fourth) -> to_the_right_out_aa(fifth, fourth) 5.71/2.41 to_the_right_in_aa(fourth, third) -> to_the_right_out_aa(fourth, third) 5.71/2.41 to_the_right_in_aa(third, second) -> to_the_right_out_aa(third, second) 5.71/2.41 to_the_right_in_aa(second, first) -> to_the_right_out_aa(second, first) 5.71/2.41 U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.41 U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.41 U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.41 eq_in_ag(X, X) -> eq_out_ag(X, X) 5.71/2.41 U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.41 U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.41 next_to_in_aa(fifth, fourth) -> next_to_out_aa(fifth, fourth) 5.71/2.41 next_to_in_aa(fourth, fifth) -> next_to_out_aa(fourth, fifth) 5.71/2.41 next_to_in_aa(fourth, third) -> next_to_out_aa(fourth, third) 5.71/2.41 next_to_in_aa(third, fourth) -> next_to_out_aa(third, fourth) 5.71/2.41 next_to_in_aa(third, second) -> next_to_out_aa(third, second) 5.71/2.41 next_to_in_aa(second, third) -> next_to_out_aa(second, third) 5.71/2.41 next_to_in_aa(second, first) -> next_to_out_aa(second, first) 5.71/2.41 next_to_in_aa(first, second) -> next_to_out_aa(first, second) 5.71/2.41 U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.41 U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.41 U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.41 U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.41 next_to_in_ga(fifth, fourth) -> next_to_out_ga(fifth, fourth) 5.71/2.41 next_to_in_ga(fourth, fifth) -> next_to_out_ga(fourth, fifth) 5.71/2.41 next_to_in_ga(fourth, third) -> next_to_out_ga(fourth, third) 5.71/2.41 next_to_in_ga(third, fourth) -> next_to_out_ga(third, fourth) 5.71/2.41 next_to_in_ga(third, second) -> next_to_out_ga(third, second) 5.71/2.41 next_to_in_ga(second, third) -> next_to_out_ga(second, third) 5.71/2.41 next_to_in_ga(second, first) -> next_to_out_ga(second, first) 5.71/2.41 next_to_in_ga(first, second) -> next_to_out_ga(first, second) 5.71/2.41 U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.41 houses_in_g(Prop) -> U20_g(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.41 domain_in_gg([], X1) -> domain_out_gg([], X1) 5.71/2.41 domain_in_gg(.(X, Rest), Domain) -> U21_gg(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.41 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.41 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.41 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.41 U21_gg(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_gg(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.41 U22_gg(X, Rest, Domain, domain_out_gg(Rest, NewDomain)) -> domain_out_gg(.(X, Rest), Domain) 5.71/2.41 U20_g(Prop, domain_out_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) -> houses_out_g(Prop) 5.71/2.41 U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.41 U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.41 U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.41 U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.41 U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_out_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) -> zebra_out_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) 5.71/2.41 5.71/2.41 The argument filtering Pi contains the following mapping: 5.71/2.41 zebra_in_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_in_aaaaaaa 5.71/2.41 5.71/2.41 U1_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U1_aaaaaaa(x8) 5.71/2.41 5.71/2.41 eq_in_aa(x1, x2) = eq_in_aa 5.71/2.41 5.71/2.41 eq_out_aa(x1, x2) = eq_out_aa 5.71/2.41 5.71/2.41 U2_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_aaaaaaa(x9) 5.71/2.41 5.71/2.41 U3_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_aaaaaaa(x10) 5.71/2.41 5.71/2.41 U4_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_aaaaaaa(x12) 5.71/2.41 5.71/2.41 U5_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_aaaaaaa(x13) 5.71/2.41 5.71/2.41 to_the_right_in_aa(x1, x2) = to_the_right_in_aa 5.71/2.41 5.71/2.41 to_the_right_out_aa(x1, x2) = to_the_right_out_aa(x1, x2) 5.71/2.41 5.71/2.41 U6_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_aaaaaaa(x14) 5.71/2.41 5.71/2.41 U7_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_aaaaaaa(x16) 5.71/2.41 5.71/2.41 U8_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_aaaaaaa(x18) 5.71/2.41 5.71/2.41 eq_in_ag(x1, x2) = eq_in_ag(x2) 5.71/2.41 5.71/2.41 eq_out_ag(x1, x2) = eq_out_ag(x1, x2) 5.71/2.41 5.71/2.41 third = third 5.71/2.41 5.71/2.41 U9_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_aaaaaaa(x19) 5.71/2.41 5.71/2.41 first = first 5.71/2.41 5.71/2.41 U10_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_aaaaaaa(x5, x19) 5.71/2.41 5.71/2.41 next_to_in_aa(x1, x2) = next_to_in_aa 5.71/2.41 5.71/2.41 next_to_out_aa(x1, x2) = next_to_out_aa(x1, x2) 5.71/2.41 5.71/2.41 U11_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U12_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_aaaaaaa(x5, x22) 5.71/2.41 5.71/2.41 U13_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_aaaaaaa(x5, x24) 5.71/2.41 5.71/2.41 U14_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_aaaaaaa(x5, x25) 5.71/2.41 5.71/2.41 next_to_in_ga(x1, x2) = next_to_in_ga(x1) 5.71/2.41 5.71/2.41 fifth = fifth 5.71/2.41 5.71/2.41 next_to_out_ga(x1, x2) = next_to_out_ga(x1, x2) 5.71/2.41 5.71/2.41 fourth = fourth 5.71/2.41 5.71/2.41 second = second 5.71/2.41 5.71/2.41 U15_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 houses_in_g(x1) = houses_in_g(x1) 5.71/2.41 5.71/2.41 .(x1, x2) = .(x2) 5.71/2.41 5.71/2.41 U20_g(x1, x2) = U20_g(x1, x2) 5.71/2.41 5.71/2.41 domain_in_gg(x1, x2) = domain_in_gg(x1, x2) 5.71/2.41 5.71/2.41 [] = [] 5.71/2.41 5.71/2.41 domain_out_gg(x1, x2) = domain_out_gg(x1, x2) 5.71/2.41 5.71/2.41 U21_gg(x1, x2, x3, x4) = U21_gg(x2, x3, x4) 5.71/2.41 5.71/2.41 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.41 5.71/2.41 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.41 5.71/2.41 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.41 5.71/2.41 U22_gg(x1, x2, x3, x4) = U22_gg(x2, x3, x4) 5.71/2.41 5.71/2.41 houses_out_g(x1) = houses_out_g(x1) 5.71/2.41 5.71/2.41 U16_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U17_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_aaaaaaa(x5, x17) 5.71/2.41 5.71/2.41 U18_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_aaaaaaa(x5, x12) 5.71/2.41 5.71/2.41 U19_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U19_aaaaaaa(x5, x8) 5.71/2.41 5.71/2.41 zebra_out_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_out_aaaaaaa(x5) 5.71/2.41 5.71/2.41 SELECT_IN_AGA(x1, x2, x3) = SELECT_IN_AGA(x2) 5.71/2.41 5.71/2.41 5.71/2.41 We have to consider all (P,R,Pi)-chains 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (8) UsableRulesProof (EQUIVALENT) 5.71/2.41 For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (9) 5.71/2.41 Obligation: 5.71/2.41 Pi DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 SELECT_IN_AGA(X, .(Y, R), .(Y, Rest)) -> SELECT_IN_AGA(X, R, Rest) 5.71/2.41 5.71/2.41 R is empty. 5.71/2.41 The argument filtering Pi contains the following mapping: 5.71/2.41 .(x1, x2) = .(x2) 5.71/2.41 5.71/2.41 SELECT_IN_AGA(x1, x2, x3) = SELECT_IN_AGA(x2) 5.71/2.41 5.71/2.41 5.71/2.41 We have to consider all (P,R,Pi)-chains 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (10) PiDPToQDPProof (SOUND) 5.71/2.41 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (11) 5.71/2.41 Obligation: 5.71/2.41 Q DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 SELECT_IN_AGA(.(R)) -> SELECT_IN_AGA(R) 5.71/2.41 5.71/2.41 R is empty. 5.71/2.41 Q is empty. 5.71/2.41 We have to consider all (P,Q,R)-chains. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (12) QDPSizeChangeProof (EQUIVALENT) 5.71/2.41 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. 5.71/2.41 5.71/2.41 From the DPs we obtained the following set of size-change graphs: 5.71/2.41 *SELECT_IN_AGA(.(R)) -> SELECT_IN_AGA(R) 5.71/2.41 The graph contains the following edges 1 > 1 5.71/2.41 5.71/2.41 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (13) 5.71/2.41 YES 5.71/2.41 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (14) 5.71/2.41 Obligation: 5.71/2.41 Pi DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 U21_GG(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> DOMAIN_IN_GG(Rest, NewDomain) 5.71/2.41 DOMAIN_IN_GG(.(X, Rest), Domain) -> U21_GG(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.41 5.71/2.41 The TRS R consists of the following rules: 5.71/2.41 5.71/2.41 zebra_in_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) -> U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_in_aa(Englishman, Red)) 5.71/2.41 eq_in_aa(X, X) -> eq_out_aa(X, X) 5.71/2.41 U1_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, eq_out_aa(Englishman, Red)) -> U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_in_aa(Spaniard, Dog)) 5.71/2.41 U2_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, eq_out_aa(Spaniard, Dog)) -> U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_in_aa(Green, Coffee)) 5.71/2.41 U3_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, eq_out_aa(Green, Coffee)) -> U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_in_aa(Ukrainian, Tea)) 5.71/2.41 U4_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, eq_out_aa(Ukrainian, Tea)) -> U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_in_aa(Green, Ivory)) 5.71/2.41 to_the_right_in_aa(fifth, fourth) -> to_the_right_out_aa(fifth, fourth) 5.71/2.41 to_the_right_in_aa(fourth, third) -> to_the_right_out_aa(fourth, third) 5.71/2.41 to_the_right_in_aa(third, second) -> to_the_right_out_aa(third, second) 5.71/2.41 to_the_right_in_aa(second, first) -> to_the_right_out_aa(second, first) 5.71/2.41 U5_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, to_the_right_out_aa(Green, Ivory)) -> U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_in_aa(Winston, Snails)) 5.71/2.41 U6_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, eq_out_aa(Winston, Snails)) -> U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_in_aa(Kool, Yellow)) 5.71/2.41 U7_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, eq_out_aa(Kool, Yellow)) -> U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_in_ag(Milk, third)) 5.71/2.41 eq_in_ag(X, X) -> eq_out_ag(X, X) 5.71/2.41 U8_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, eq_out_ag(Milk, third)) -> U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_in_ag(Norwegian, first)) 5.71/2.41 U9_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, eq_out_ag(Norwegian, first)) -> U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_in_aa(Fox, Chesterfield)) 5.71/2.41 next_to_in_aa(fifth, fourth) -> next_to_out_aa(fifth, fourth) 5.71/2.41 next_to_in_aa(fourth, fifth) -> next_to_out_aa(fourth, fifth) 5.71/2.41 next_to_in_aa(fourth, third) -> next_to_out_aa(fourth, third) 5.71/2.41 next_to_in_aa(third, fourth) -> next_to_out_aa(third, fourth) 5.71/2.41 next_to_in_aa(third, second) -> next_to_out_aa(third, second) 5.71/2.41 next_to_in_aa(second, third) -> next_to_out_aa(second, third) 5.71/2.41 next_to_in_aa(second, first) -> next_to_out_aa(second, first) 5.71/2.41 next_to_in_aa(first, second) -> next_to_out_aa(first, second) 5.71/2.41 U10_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, next_to_out_aa(Fox, Chesterfield)) -> U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_in_aa(Horse, Kool)) 5.71/2.41 U11_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, next_to_out_aa(Horse, Kool)) -> U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_in_aa(Lucky, Juice)) 5.71/2.41 U12_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, eq_out_aa(Lucky, Juice)) -> U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_in_aa(Japanese, Parliament)) 5.71/2.41 U13_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, eq_out_aa(Japanese, Parliament)) -> U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_in_ga(Norwegian, Blue)) 5.71/2.41 next_to_in_ga(fifth, fourth) -> next_to_out_ga(fifth, fourth) 5.71/2.41 next_to_in_ga(fourth, fifth) -> next_to_out_ga(fourth, fifth) 5.71/2.41 next_to_in_ga(fourth, third) -> next_to_out_ga(fourth, third) 5.71/2.41 next_to_in_ga(third, fourth) -> next_to_out_ga(third, fourth) 5.71/2.41 next_to_in_ga(third, second) -> next_to_out_ga(third, second) 5.71/2.41 next_to_in_ga(second, third) -> next_to_out_ga(second, third) 5.71/2.41 next_to_in_ga(second, first) -> next_to_out_ga(second, first) 5.71/2.41 next_to_in_ga(first, second) -> next_to_out_ga(first, second) 5.71/2.41 U14_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Red, Dog, Green, Coffee, Tea, Ivory, Winston, Snails, Kool, Yellow, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, next_to_out_ga(Norwegian, Blue)) -> U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) 5.71/2.41 houses_in_g(Prop) -> U20_g(Prop, domain_in_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) 5.71/2.41 domain_in_gg([], X1) -> domain_out_gg([], X1) 5.71/2.41 domain_in_gg(.(X, Rest), Domain) -> U21_gg(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.41 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.41 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.41 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.41 U21_gg(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> U22_gg(X, Rest, Domain, domain_in_gg(Rest, NewDomain)) 5.71/2.41 U22_gg(X, Rest, Domain, domain_out_gg(Rest, NewDomain)) -> domain_out_gg(.(X, Rest), Domain) 5.71/2.41 U20_g(Prop, domain_out_gg(Prop, .(first, .(second, .(third, .(fourth, .(fifth, []))))))) -> houses_out_g(Prop) 5.71/2.41 U15_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Blue, .(Green, .(Red, .(Yellow, .(Ivory, []))))))) -> U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_in_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) 5.71/2.41 U16_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Dog, Coffee, Tea, Winston, Snails, Kool, Milk, Fox, Chesterfield, Horse, Lucky, Juice, Parliament, houses_out_g(.(Norwegian, .(Englishman, .(Spaniard, .(Japanese, .(Ukrainian, []))))))) -> U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_in_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) 5.71/2.41 U17_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Winston, Kool, Milk, Chesterfield, Lucky, Juice, Parliament, houses_out_g(.(Dog, .(Zebra, .(Fox, .(Snails, .(Horse, []))))))) -> U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_in_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) 5.71/2.41 U18_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, Coffee, Tea, Milk, Juice, houses_out_g(.(Parliament, .(Kool, .(Lucky, .(Chesterfield, .(Winston, []))))))) -> U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_in_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) 5.71/2.41 U19_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water, houses_out_g(.(Milk, .(Juice, .(Water, .(Tea, .(Coffee, []))))))) -> zebra_out_aaaaaaa(Englishman, Spaniard, Japanese, Ukrainian, Norwegian, Zebra, Water) 5.71/2.41 5.71/2.41 The argument filtering Pi contains the following mapping: 5.71/2.41 zebra_in_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_in_aaaaaaa 5.71/2.41 5.71/2.41 U1_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U1_aaaaaaa(x8) 5.71/2.41 5.71/2.41 eq_in_aa(x1, x2) = eq_in_aa 5.71/2.41 5.71/2.41 eq_out_aa(x1, x2) = eq_out_aa 5.71/2.41 5.71/2.41 U2_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9) = U2_aaaaaaa(x9) 5.71/2.41 5.71/2.41 U3_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10) = U3_aaaaaaa(x10) 5.71/2.41 5.71/2.41 U4_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U4_aaaaaaa(x12) 5.71/2.41 5.71/2.41 U5_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13) = U5_aaaaaaa(x13) 5.71/2.41 5.71/2.41 to_the_right_in_aa(x1, x2) = to_the_right_in_aa 5.71/2.41 5.71/2.41 to_the_right_out_aa(x1, x2) = to_the_right_out_aa(x1, x2) 5.71/2.41 5.71/2.41 U6_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14) = U6_aaaaaaa(x14) 5.71/2.41 5.71/2.41 U7_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16) = U7_aaaaaaa(x16) 5.71/2.41 5.71/2.41 U8_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18) = U8_aaaaaaa(x18) 5.71/2.41 5.71/2.41 eq_in_ag(x1, x2) = eq_in_ag(x2) 5.71/2.41 5.71/2.41 eq_out_ag(x1, x2) = eq_out_ag(x1, x2) 5.71/2.41 5.71/2.41 third = third 5.71/2.41 5.71/2.41 U9_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U9_aaaaaaa(x19) 5.71/2.41 5.71/2.41 first = first 5.71/2.41 5.71/2.41 U10_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19) = U10_aaaaaaa(x5, x19) 5.71/2.41 5.71/2.41 next_to_in_aa(x1, x2) = next_to_in_aa 5.71/2.41 5.71/2.41 next_to_out_aa(x1, x2) = next_to_out_aa(x1, x2) 5.71/2.41 5.71/2.41 U11_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U11_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U12_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22) = U12_aaaaaaa(x5, x22) 5.71/2.41 5.71/2.41 U13_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24) = U13_aaaaaaa(x5, x24) 5.71/2.41 5.71/2.41 U14_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21, x22, x23, x24, x25) = U14_aaaaaaa(x5, x25) 5.71/2.41 5.71/2.41 next_to_in_ga(x1, x2) = next_to_in_ga(x1) 5.71/2.41 5.71/2.41 fifth = fifth 5.71/2.41 5.71/2.41 next_to_out_ga(x1, x2) = next_to_out_ga(x1, x2) 5.71/2.41 5.71/2.41 fourth = fourth 5.71/2.41 5.71/2.41 second = second 5.71/2.41 5.71/2.41 U15_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U15_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 houses_in_g(x1) = houses_in_g(x1) 5.71/2.41 5.71/2.41 .(x1, x2) = .(x2) 5.71/2.41 5.71/2.41 U20_g(x1, x2) = U20_g(x1, x2) 5.71/2.41 5.71/2.41 domain_in_gg(x1, x2) = domain_in_gg(x1, x2) 5.71/2.41 5.71/2.41 [] = [] 5.71/2.41 5.71/2.41 domain_out_gg(x1, x2) = domain_out_gg(x1, x2) 5.71/2.41 5.71/2.41 U21_gg(x1, x2, x3, x4) = U21_gg(x2, x3, x4) 5.71/2.41 5.71/2.41 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.41 5.71/2.41 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.41 5.71/2.41 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.41 5.71/2.41 U22_gg(x1, x2, x3, x4) = U22_gg(x2, x3, x4) 5.71/2.41 5.71/2.41 houses_out_g(x1) = houses_out_g(x1) 5.71/2.41 5.71/2.41 U16_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, x21) = U16_aaaaaaa(x5, x21) 5.71/2.41 5.71/2.41 U17_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17) = U17_aaaaaaa(x5, x17) 5.71/2.41 5.71/2.41 U18_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12) = U18_aaaaaaa(x5, x12) 5.71/2.41 5.71/2.41 U19_aaaaaaa(x1, x2, x3, x4, x5, x6, x7, x8) = U19_aaaaaaa(x5, x8) 5.71/2.41 5.71/2.41 zebra_out_aaaaaaa(x1, x2, x3, x4, x5, x6, x7) = zebra_out_aaaaaaa(x5) 5.71/2.41 5.71/2.41 DOMAIN_IN_GG(x1, x2) = DOMAIN_IN_GG(x1, x2) 5.71/2.41 5.71/2.41 U21_GG(x1, x2, x3, x4) = U21_GG(x2, x3, x4) 5.71/2.41 5.71/2.41 5.71/2.41 We have to consider all (P,R,Pi)-chains 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (15) UsableRulesProof (EQUIVALENT) 5.71/2.41 For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (16) 5.71/2.41 Obligation: 5.71/2.41 Pi DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 U21_GG(X, Rest, Domain, select_out_aga(X, Domain, NewDomain)) -> DOMAIN_IN_GG(Rest, NewDomain) 5.71/2.41 DOMAIN_IN_GG(.(X, Rest), Domain) -> U21_GG(X, Rest, Domain, select_in_aga(X, Domain, NewDomain)) 5.71/2.41 5.71/2.41 The TRS R consists of the following rules: 5.71/2.41 5.71/2.41 select_in_aga(X, .(X, R), R) -> select_out_aga(X, .(X, R), R) 5.71/2.41 select_in_aga(X, .(Y, R), .(Y, Rest)) -> U23_aga(X, Y, R, Rest, select_in_aga(X, R, Rest)) 5.71/2.41 U23_aga(X, Y, R, Rest, select_out_aga(X, R, Rest)) -> select_out_aga(X, .(Y, R), .(Y, Rest)) 5.71/2.41 5.71/2.41 The argument filtering Pi contains the following mapping: 5.71/2.41 .(x1, x2) = .(x2) 5.71/2.41 5.71/2.41 select_in_aga(x1, x2, x3) = select_in_aga(x2) 5.71/2.41 5.71/2.41 select_out_aga(x1, x2, x3) = select_out_aga(x2, x3) 5.71/2.41 5.71/2.41 U23_aga(x1, x2, x3, x4, x5) = U23_aga(x3, x5) 5.71/2.41 5.71/2.41 DOMAIN_IN_GG(x1, x2) = DOMAIN_IN_GG(x1, x2) 5.71/2.41 5.71/2.41 U21_GG(x1, x2, x3, x4) = U21_GG(x2, x3, x4) 5.71/2.41 5.71/2.41 5.71/2.41 We have to consider all (P,R,Pi)-chains 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (17) PiDPToQDPProof (SOUND) 5.71/2.41 Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (18) 5.71/2.41 Obligation: 5.71/2.41 Q DP problem: 5.71/2.41 The TRS P consists of the following rules: 5.71/2.41 5.71/2.41 U21_GG(Rest, Domain, select_out_aga(Domain, NewDomain)) -> DOMAIN_IN_GG(Rest, NewDomain) 5.71/2.41 DOMAIN_IN_GG(.(Rest), Domain) -> U21_GG(Rest, Domain, select_in_aga(Domain)) 5.71/2.41 5.71/2.41 The TRS R consists of the following rules: 5.71/2.41 5.71/2.41 select_in_aga(.(R)) -> select_out_aga(.(R), R) 5.71/2.41 select_in_aga(.(R)) -> U23_aga(R, select_in_aga(R)) 5.71/2.41 U23_aga(R, select_out_aga(R, Rest)) -> select_out_aga(.(R), .(Rest)) 5.71/2.41 5.71/2.41 The set Q consists of the following terms: 5.71/2.41 5.71/2.41 select_in_aga(x0) 5.71/2.41 U23_aga(x0, x1) 5.71/2.41 5.71/2.41 We have to consider all (P,Q,R)-chains. 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (19) QDPSizeChangeProof (EQUIVALENT) 5.71/2.41 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. 5.71/2.41 5.71/2.41 From the DPs we obtained the following set of size-change graphs: 5.71/2.41 *DOMAIN_IN_GG(.(Rest), Domain) -> U21_GG(Rest, Domain, select_in_aga(Domain)) 5.71/2.41 The graph contains the following edges 1 > 1, 2 >= 2 5.71/2.41 5.71/2.41 5.71/2.41 *U21_GG(Rest, Domain, select_out_aga(Domain, NewDomain)) -> DOMAIN_IN_GG(Rest, NewDomain) 5.71/2.41 The graph contains the following edges 1 >= 1, 3 > 2 5.71/2.41 5.71/2.41 5.71/2.41 ---------------------------------------- 5.71/2.41 5.71/2.41 (20) 5.71/2.41 YES 6.08/2.45 EOF