0 Prolog
↳1 PrologToPiTRSProof (⇐)
↳2 PiTRS
↳3 DependencyPairsProof (⇔)
↳4 PiDP
↳5 DependencyGraphProof (⇔)
↳6 AND
↳7 PiDP
↳8 UsableRulesProof (⇔)
↳9 PiDP
↳10 PiDPToQDPProof (⇐)
↳11 QDP
↳12 QDPSizeChangeProof (⇔)
↳13 TRUE
↳14 PiDP
↳15 UsableRulesProof (⇔)
↳16 PiDP
↳17 PiDPToQDPProof (⇐)
↳18 QDP
↳19 Narrowing (⇐)
↳20 QDP
↳21 Instantiation (⇔)
↳22 QDP
↳23 NonTerminationProof (⇔)
↳24 FALSE
↳25 PiDP
↳26 UsableRulesProof (⇔)
↳27 PiDP
↳28 PiDPToQDPProof (⇐)
↳29 QDP
↳30 QDPSizeChangeProof (⇔)
↳31 TRUE
↳32 PiDP
↳33 UsableRulesProof (⇔)
↳34 PiDP
↳35 PiDPToQDPProof (⇐)
↳36 QDP
↳37 Narrowing (⇐)
↳38 QDP
↳39 UsableRulesProof (⇔)
↳40 QDP
↳41 QReductionProof (⇔)
↳42 QDP
↳43 PrologToPiTRSProof (⇐)
↳44 PiTRS
↳45 DependencyPairsProof (⇔)
↳46 PiDP
↳47 DependencyGraphProof (⇔)
↳48 AND
↳49 PiDP
↳50 UsableRulesProof (⇔)
↳51 PiDP
↳52 PiDPToQDPProof (⇐)
↳53 QDP
↳54 QDPSizeChangeProof (⇔)
↳55 TRUE
↳56 PiDP
↳57 UsableRulesProof (⇔)
↳58 PiDP
↳59 PiDPToQDPProof (⇐)
↳60 QDP
↳61 Narrowing (⇐)
↳62 QDP
↳63 Instantiation (⇔)
↳64 QDP
↳65 NonTerminationProof (⇔)
↳66 FALSE
↳67 PiDP
↳68 UsableRulesProof (⇔)
↳69 PiDP
↳70 PiDPToQDPProof (⇐)
↳71 QDP
↳72 QDPSizeChangeProof (⇔)
↳73 TRUE
↳74 PiDP
↳75 UsableRulesProof (⇔)
↳76 PiDP
↳77 PiDPToQDPProof (⇐)
↳78 QDP
↳79 Narrowing (⇐)
↳80 QDP
↳81 UsableRulesProof (⇔)
↳82 QDP
↳83 QReductionProof (⇔)
↳84 QDP
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → COLOR_REGION_IN_AG(Region, Colors)
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → U3_AG(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → SELECT_IN_AGA(Color, Colors, Colors1)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → U5_AGA(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_AG(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → MEMBERS_IN_AG(Neighbors, Colors1)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
MEMBERS_IN_AG(.(X, Xs), Ys) → MEMBER_IN_AG(X, Ys)
MEMBER_IN_AG(X, .(X2, Xs)) → U8_AG(X, X2, Xs, member_in_ag(X, Xs))
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → U7_AG(X, Xs, Ys, members_in_ag(Xs, Ys))
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_AG(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → COLOR_REGION_IN_AG(Region, Colors)
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → U3_AG(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → SELECT_IN_AGA(Color, Colors, Colors1)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → U5_AGA(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_AG(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → MEMBERS_IN_AG(Neighbors, Colors1)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
MEMBERS_IN_AG(.(X, Xs), Ys) → MEMBER_IN_AG(X, Ys)
MEMBER_IN_AG(X, .(X2, Xs)) → U8_AG(X, X2, Xs, member_in_ag(X, Xs))
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → U7_AG(X, Xs, Ys, members_in_ag(Xs, Ys))
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_AG(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
MEMBER_IN_AG(.(X2, Xs)) → MEMBER_IN_AG(Xs)
From the DPs we obtained the following set of size-change graphs:
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_AG(Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Ys)
MEMBERS_IN_AG(Ys) → U6_AG(Ys, member_in_ag(Ys))
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
member_in_ag(x0)
U8_ag(x0, x1, x2)
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), member_out_ag(x0, .(x0, x1)))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), U8_ag(x0, x1, member_in_ag(x1)))
U6_AG(Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Ys)
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), member_out_ag(x0, .(x0, x1)))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), U8_ag(x0, x1, member_in_ag(x1)))
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
member_in_ag(x0)
U8_ag(x0, x1, x2)
U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1))) → MEMBERS_IN_AG(.(z0, z1))
U6_AG(.(z0, z1), member_out_ag(x1, .(z0, z1))) → MEMBERS_IN_AG(.(z0, z1))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), member_out_ag(x0, .(x0, x1)))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), U8_ag(x0, x1, member_in_ag(x1)))
U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1))) → MEMBERS_IN_AG(.(z0, z1))
U6_AG(.(z0, z1), member_out_ag(x1, .(z0, z1))) → MEMBERS_IN_AG(.(z0, z1))
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
member_in_ag(x0)
U8_ag(x0, x1, x2)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
SELECT_IN_AGA(.(Y, Ys)) → SELECT_IN_AGA(Ys)
From the DPs we obtained the following set of size-change graphs:
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U1_AG(Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(Colors) → U1_AG(Colors, color_region_in_ag(Colors))
color_region_in_ag(Colors) → U3_ag(Colors, select_in_aga(Colors))
U3_ag(Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Color, Colors, members_in_ag(Colors1))
select_in_aga(.(X, Xs)) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, Ys, select_in_aga(Ys))
U4_ag(Color, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Color, Neighbors), Colors)
U5_aga(Y, Ys, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([], Ys)
U6_ag(Ys, member_out_ag(X, Ys)) → U7_ag(X, Ys, members_in_ag(Ys))
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U7_ag(X, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
color_region_in_ag(x0)
U3_ag(x0, x1)
select_in_aga(x0)
U4_ag(x0, x1, x2)
U5_aga(x0, x1, x2)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1, x2)
U8_ag(x0, x1, x2)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(x0, select_in_aga(x0)))
U1_AG(Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(x0, select_in_aga(x0)))
color_region_in_ag(Colors) → U3_ag(Colors, select_in_aga(Colors))
U3_ag(Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Color, Colors, members_in_ag(Colors1))
select_in_aga(.(X, Xs)) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, Ys, select_in_aga(Ys))
U4_ag(Color, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Color, Neighbors), Colors)
U5_aga(Y, Ys, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([], Ys)
U6_ag(Ys, member_out_ag(X, Ys)) → U7_ag(X, Ys, members_in_ag(Ys))
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U7_ag(X, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
color_region_in_ag(x0)
U3_ag(x0, x1)
select_in_aga(x0)
U4_ag(x0, x1, x2)
U5_aga(x0, x1, x2)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1, x2)
U8_ag(x0, x1, x2)
U1_AG(Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(x0, select_in_aga(x0)))
select_in_aga(.(X, Xs)) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, Ys, select_in_aga(Ys))
U3_ag(Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Color, Colors, members_in_ag(Colors1))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([], Ys)
U4_ag(Color, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Color, Neighbors), Colors)
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U6_ag(Ys, member_out_ag(X, Ys)) → U7_ag(X, Ys, members_in_ag(Ys))
U7_ag(X, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U5_aga(Y, Ys, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
color_region_in_ag(x0)
U3_ag(x0, x1)
select_in_aga(x0)
U4_ag(x0, x1, x2)
U5_aga(x0, x1, x2)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1, x2)
U8_ag(x0, x1, x2)
color_region_in_ag(x0)
U1_AG(Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(x0, select_in_aga(x0)))
select_in_aga(.(X, Xs)) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, Ys, select_in_aga(Ys))
U3_ag(Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Color, Colors, members_in_ag(Colors1))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([], Ys)
U4_ag(Color, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Color, Neighbors), Colors)
member_in_ag(.(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(.(X2, Xs)) → U8_ag(X2, Xs, member_in_ag(Xs))
U6_ag(Ys, member_out_ag(X, Ys)) → U7_ag(X, Ys, members_in_ag(Ys))
U7_ag(X, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U8_ag(X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U5_aga(Y, Ys, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(x0, x1)
select_in_aga(x0)
U4_ag(x0, x1, x2)
U5_aga(x0, x1, x2)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1, x2)
U8_ag(x0, x1, x2)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → COLOR_REGION_IN_AG(Region, Colors)
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → U3_AG(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → SELECT_IN_AGA(Color, Colors, Colors1)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → U5_AGA(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_AG(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → MEMBERS_IN_AG(Neighbors, Colors1)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
MEMBERS_IN_AG(.(X, Xs), Ys) → MEMBER_IN_AG(X, Ys)
MEMBER_IN_AG(X, .(X2, Xs)) → U8_AG(X, X2, Xs, member_in_ag(X, Xs))
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → U7_AG(X, Xs, Ys, members_in_ag(Xs, Ys))
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_AG(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → COLOR_REGION_IN_AG(Region, Colors)
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → U3_AG(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
COLOR_REGION_IN_AG(region(Name, Color, Neighbors), Colors) → SELECT_IN_AGA(Color, Colors, Colors1)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → U5_AGA(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_AG(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
U3_AG(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → MEMBERS_IN_AG(Neighbors, Colors1)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
MEMBERS_IN_AG(.(X, Xs), Ys) → MEMBER_IN_AG(X, Ys)
MEMBER_IN_AG(X, .(X2, Xs)) → U8_AG(X, X2, Xs, member_in_ag(X, Xs))
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → U7_AG(X, Xs, Ys, members_in_ag(Xs, Ys))
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_AG(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
MEMBER_IN_AG(X, .(X2, Xs)) → MEMBER_IN_AG(X, Xs)
MEMBER_IN_AG(.(X2, Xs)) → MEMBER_IN_AG(Xs)
From the DPs we obtained the following set of size-change graphs:
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
U6_AG(X, Xs, Ys, member_out_ag(X, Ys)) → MEMBERS_IN_AG(Xs, Ys)
MEMBERS_IN_AG(.(X, Xs), Ys) → U6_AG(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_AG(Ys, member_out_ag(X)) → MEMBERS_IN_AG(Ys)
MEMBERS_IN_AG(Ys) → U6_AG(Ys, member_in_ag(Ys))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
member_in_ag(x0)
U8_ag(x0)
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), member_out_ag(x0))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), U8_ag(member_in_ag(x1)))
U6_AG(Ys, member_out_ag(X)) → MEMBERS_IN_AG(Ys)
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), member_out_ag(x0))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), U8_ag(member_in_ag(x1)))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
member_in_ag(x0)
U8_ag(x0)
U6_AG(.(z0, z1), member_out_ag(z0)) → MEMBERS_IN_AG(.(z0, z1))
U6_AG(.(z0, z1), member_out_ag(x1)) → MEMBERS_IN_AG(.(z0, z1))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), member_out_ag(x0))
MEMBERS_IN_AG(.(x0, x1)) → U6_AG(.(x0, x1), U8_ag(member_in_ag(x1)))
U6_AG(.(z0, z1), member_out_ag(z0)) → MEMBERS_IN_AG(.(z0, z1))
U6_AG(.(z0, z1), member_out_ag(x1)) → MEMBERS_IN_AG(.(z0, z1))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
member_in_ag(x0)
U8_ag(x0)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) → SELECT_IN_AGA(X, Ys, Zs)
SELECT_IN_AGA(.(Y, Ys)) → SELECT_IN_AGA(Ys)
From the DPs we obtained the following set of size-change graphs:
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_map_in_ag(.(Region, Regions), Colors) → U1_ag(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U1_ag(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → U2_ag(Region, Regions, Colors, color_map_in_ag(Regions, Colors))
color_map_in_ag([], Colors) → color_map_out_ag([], Colors)
U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) → color_map_out_ag(.(Region, Regions), Colors)
U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) → COLOR_MAP_IN_AG(Regions, Colors)
COLOR_MAP_IN_AG(.(Region, Regions), Colors) → U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
color_region_in_ag(region(Name, Color, Neighbors), Colors) → U3_ag(Name, Color, Neighbors, Colors, select_in_aga(Color, Colors, Colors1))
U3_ag(Name, Color, Neighbors, Colors, select_out_aga(Color, Colors, Colors1)) → U4_ag(Name, Color, Neighbors, Colors, members_in_ag(Neighbors, Colors1))
select_in_aga(X, .(X, Xs), Xs) → select_out_aga(X, .(X, Xs), Xs)
select_in_aga(X, .(Y, Ys), .(Y, Zs)) → U5_aga(X, Y, Ys, Zs, select_in_aga(X, Ys, Zs))
U4_ag(Name, Color, Neighbors, Colors, members_out_ag(Neighbors, Colors1)) → color_region_out_ag(region(Name, Color, Neighbors), Colors)
U5_aga(X, Y, Ys, Zs, select_out_aga(X, Ys, Zs)) → select_out_aga(X, .(Y, Ys), .(Y, Zs))
members_in_ag(.(X, Xs), Ys) → U6_ag(X, Xs, Ys, member_in_ag(X, Ys))
members_in_ag([], Ys) → members_out_ag([], Ys)
U6_ag(X, Xs, Ys, member_out_ag(X, Ys)) → U7_ag(X, Xs, Ys, members_in_ag(Xs, Ys))
member_in_ag(X, .(X, X1)) → member_out_ag(X, .(X, X1))
member_in_ag(X, .(X2, Xs)) → U8_ag(X, X2, Xs, member_in_ag(X, Xs))
U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) → members_out_ag(.(X, Xs), Ys)
U8_ag(X, X2, Xs, member_out_ag(X, Xs)) → member_out_ag(X, .(X2, Xs))
U1_AG(Colors, color_region_out_ag(Region)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(Colors) → U1_AG(Colors, color_region_in_ag(Colors))
color_region_in_ag(Colors) → U3_ag(select_in_aga(Colors))
U3_ag(select_out_aga(Color, Colors1)) → U4_ag(Color, members_in_ag(Colors1))
select_in_aga(.(X, Xs)) → select_out_aga(X, Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, select_in_aga(Ys))
U4_ag(Color, members_out_ag(Neighbors)) → color_region_out_ag(region(Color, Neighbors))
U5_aga(Y, select_out_aga(X, Zs)) → select_out_aga(X, .(Y, Zs))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([])
U6_ag(Ys, member_out_ag(X)) → U7_ag(X, members_in_ag(Ys))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U7_ag(X, members_out_ag(Xs)) → members_out_ag(.(X, Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
color_region_in_ag(x0)
U3_ag(x0)
select_in_aga(x0)
U4_ag(x0, x1)
U5_aga(x0, x1)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1)
U8_ag(x0)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(select_in_aga(x0)))
U1_AG(Colors, color_region_out_ag(Region)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(select_in_aga(x0)))
color_region_in_ag(Colors) → U3_ag(select_in_aga(Colors))
U3_ag(select_out_aga(Color, Colors1)) → U4_ag(Color, members_in_ag(Colors1))
select_in_aga(.(X, Xs)) → select_out_aga(X, Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, select_in_aga(Ys))
U4_ag(Color, members_out_ag(Neighbors)) → color_region_out_ag(region(Color, Neighbors))
U5_aga(Y, select_out_aga(X, Zs)) → select_out_aga(X, .(Y, Zs))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([])
U6_ag(Ys, member_out_ag(X)) → U7_ag(X, members_in_ag(Ys))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U7_ag(X, members_out_ag(Xs)) → members_out_ag(.(X, Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
color_region_in_ag(x0)
U3_ag(x0)
select_in_aga(x0)
U4_ag(x0, x1)
U5_aga(x0, x1)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1)
U8_ag(x0)
U1_AG(Colors, color_region_out_ag(Region)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(select_in_aga(x0)))
select_in_aga(.(X, Xs)) → select_out_aga(X, Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, select_in_aga(Ys))
U3_ag(select_out_aga(Color, Colors1)) → U4_ag(Color, members_in_ag(Colors1))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([])
U4_ag(Color, members_out_ag(Neighbors)) → color_region_out_ag(region(Color, Neighbors))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U6_ag(Ys, member_out_ag(X)) → U7_ag(X, members_in_ag(Ys))
U7_ag(X, members_out_ag(Xs)) → members_out_ag(.(X, Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
U5_aga(Y, select_out_aga(X, Zs)) → select_out_aga(X, .(Y, Zs))
color_region_in_ag(x0)
U3_ag(x0)
select_in_aga(x0)
U4_ag(x0, x1)
U5_aga(x0, x1)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1)
U8_ag(x0)
color_region_in_ag(x0)
U1_AG(Colors, color_region_out_ag(Region)) → COLOR_MAP_IN_AG(Colors)
COLOR_MAP_IN_AG(x0) → U1_AG(x0, U3_ag(select_in_aga(x0)))
select_in_aga(.(X, Xs)) → select_out_aga(X, Xs)
select_in_aga(.(Y, Ys)) → U5_aga(Y, select_in_aga(Ys))
U3_ag(select_out_aga(Color, Colors1)) → U4_ag(Color, members_in_ag(Colors1))
members_in_ag(Ys) → U6_ag(Ys, member_in_ag(Ys))
members_in_ag(Ys) → members_out_ag([])
U4_ag(Color, members_out_ag(Neighbors)) → color_region_out_ag(region(Color, Neighbors))
member_in_ag(.(X, X1)) → member_out_ag(X)
member_in_ag(.(X2, Xs)) → U8_ag(member_in_ag(Xs))
U6_ag(Ys, member_out_ag(X)) → U7_ag(X, members_in_ag(Ys))
U7_ag(X, members_out_ag(Xs)) → members_out_ag(.(X, Xs))
U8_ag(member_out_ag(X)) → member_out_ag(X)
U5_aga(Y, select_out_aga(X, Zs)) → select_out_aga(X, .(Y, Zs))
U3_ag(x0)
select_in_aga(x0)
U4_ag(x0, x1)
U5_aga(x0, x1)
members_in_ag(x0)
U6_ag(x0, x1)
member_in_ag(x0)
U7_ag(x0, x1)
U8_ag(x0)