MAYBE

Found an example we currently can't prove?
-> Consider contributing it to the benchmark set: https://mysolvertimesout.org/

proof of /hpcwork/ff862203/termcomp26/benchmarks/jeIQ4.pl
# AProVE Commit ID: 23a904c96b029b0a549cde0d0d17dbccf967db59 jckassing 20260626 unpublished dirty


Left Termination of the query pattern

color_map(a,g)

w.r.t. the given Prolog program could not be shown:

(0) Prolog
(1) PrologToPiTRSProof [SOUND, 0 ms]
(2) PiTRS
    (3) DependencyPairsProof [EQUIVALENT, 0 ms]
    (4) PiDP
    (5) DependencyGraphProof [EQUIVALENT, 0 ms]
    (6) AND
        (7) PiDP
            (8) UsableRulesProof [EQUIVALENT, 0 ms]
            (9) PiDP
            (10) PiDPToQDPProof [SOUND, 0 ms]
            (11) QDP
            (12) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (13) YES
        (14) PiDP
            (15) UsableRulesProof [EQUIVALENT, 0 ms]
            (16) PiDP
            (17) PiDPToQDPProof [SOUND, 0 ms]
            (18) QDP
            (19) TransformationProof [SOUND, 0 ms]
            (20) QDP
            (21) TransformationProof [EQUIVALENT, 0 ms]
            (22) QDP
            (23) NonTerminationLoopProof [COMPLETE, 0 ms]
            (24) NO
        (25) PiDP
            (26) UsableRulesProof [EQUIVALENT, 0 ms]
            (27) PiDP
            (28) PiDPToQDPProof [SOUND, 0 ms]
            (29) QDP
            (30) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (31) YES
        (32) PiDP
            (33) UsableRulesProof [EQUIVALENT, 0 ms]
            (34) PiDP
            (35) PiDPToQDPProof [SOUND, 0 ms]
            (36) QDP
(37) PrologToPiTRSProof [SOUND, 0 ms]
(38) PiTRS
    (39) DependencyPairsProof [EQUIVALENT, 0 ms]
    (40) PiDP
    (41) DependencyGraphProof [EQUIVALENT, 0 ms]
    (42) AND
        (43) PiDP
            (44) UsableRulesProof [EQUIVALENT, 0 ms]
            (45) PiDP
            (46) PiDPToQDPProof [SOUND, 0 ms]
            (47) QDP
            (48) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (49) YES
        (50) PiDP
            (51) UsableRulesProof [EQUIVALENT, 0 ms]
            (52) PiDP
            (53) PiDPToQDPProof [SOUND, 0 ms]
            (54) QDP
            (55) TransformationProof [SOUND, 0 ms]
            (56) QDP
            (57) TransformationProof [EQUIVALENT, 0 ms]
            (58) QDP
            (59) NonTerminationLoopProof [COMPLETE, 0 ms]
            (60) NO
        (61) PiDP
            (62) UsableRulesProof [EQUIVALENT, 0 ms]
            (63) PiDP
            (64) PiDPToQDPProof [SOUND, 0 ms]
            (65) QDP
            (66) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (67) YES
        (68) PiDP
            (69) UsableRulesProof [EQUIVALENT, 0 ms]
            (70) PiDP
            (71) PiDPToQDPProof [SOUND, 0 ms]
            (72) QDP
(73) PrologToDTProblemTransformerProof [SOUND, 0 ms]
(74) TRIPLES
    (75) TriplesToPiDPProof [SOUND, 0 ms]
    (76) PiDP
    (77) DependencyGraphProof [EQUIVALENT, 0 ms]
    (78) AND
        (79) PiDP
            (80) UsableRulesProof [EQUIVALENT, 0 ms]
            (81) PiDP
            (82) PiDPToQDPProof [SOUND, 0 ms]
            (83) QDP
            (84) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (85) YES
        (86) PiDP
            (87) UsableRulesProof [EQUIVALENT, 0 ms]
            (88) PiDP
            (89) PiDPToQDPProof [SOUND, 0 ms]
            (90) QDP
            (91) TransformationProof [SOUND, 0 ms]
            (92) QDP
            (93) TransformationProof [EQUIVALENT, 0 ms]
            (94) QDP
            (95) NonTerminationLoopProof [COMPLETE, 0 ms]
            (96) NO
        (97) PiDP
            (98) UsableRulesProof [EQUIVALENT, 0 ms]
            (99) PiDP
            (100) PiDPToQDPProof [SOUND, 0 ms]
            (101) QDP
            (102) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (103) YES
        (104) PiDP
            (105) PiDPToQDPProof [SOUND, 0 ms]
            (106) QDP
(107) PrologToTRSTransformerProof [SOUND, 0 ms]
(108) QTRS
    (109) DependencyPairsProof [EQUIVALENT, 0 ms]
    (110) QDP
    (111) DependencyGraphProof [EQUIVALENT, 0 ms]
    (112) AND
        (113) QDP
            (114) UsableRulesProof [EQUIVALENT, 0 ms]
            (115) QDP
            (116) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (117) YES
        (118) QDP
            (119) NonTerminationLoopProof [COMPLETE, 0 ms]
            (120) NO
        (121) QDP
            (122) UsableRulesProof [EQUIVALENT, 0 ms]
            (123) QDP
            (124) QDPSizeChangeProof [EQUIVALENT, 0 ms]
            (125) YES
        (126) QDP
            (127) NonTerminationLoopProof [COMPLETE, 4 ms]
            (128) NO
(129) PrologToIRSwTTransformerProof [SOUND, 0 ms]
(130) AND
    (131) IRSwT
        (132) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (133) TRUE
    (134) IRSwT
        (135) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (136) TRUE
    (137) IRSwT
        (138) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (139) IRSwT
        (140) IntTRSCompressionProof [EQUIVALENT, 13 ms]
        (141) IRSwT
        (142) IRSFormatTransformerProof [EQUIVALENT, 0 ms]
        (143) IRSwT
        (144) IRSwTTerminationDigraphProof [EQUIVALENT, 2 ms]
        (145) IRSwT
        (146) IntTRSUnneededArgumentFilterProof [EQUIVALENT, 8 ms]
        (147) IRSwT
        (148) TempFilterProof [SOUND, 1 ms]
        (149) IRSwT
        (150) IRSwTToQDPProof [SOUND, 0 ms]
        (151) QDP
        (152) QDPSizeChangeProof [EQUIVALENT, 0 ms]
        (153) YES
    (154) IRSwT
        (155) IRSwTSimpleDependencyGraphProof [EQUIVALENT, 0 ms]
        (156) IRSwT
        (157) IntTRSCompressionProof [EQUIVALENT, 13 ms]
        (158) IRSwT
        (159) IRSFormatTransformerProof [EQUIVALENT, 0 ms]
        (160) IRSwT
        (161) IRSwTTerminationDigraphProof [EQUIVALENT, 37 ms]
        (162) IRSwT
        (163) IntTRSUnneededArgumentFilterProof [EQUIVALENT, 0 ms]
        (164) IRSwT


----------------------------------------

(0)
Obligation:
Clauses:

color_map(l(Region, Regions), Colors) :- ','(color_region(Region, Colors), color_map(Regions, Colors)).
color_map(nil, Colors).
color_region(region(Name, Color, Neighbors), Colors) :- ','(select(Color, Colors, Colors1), members(Neighbors, Colors1)).
select(X, .(X, Xs), Xs).
select(X, .(Y, Ys), .(Y, Zs)) :- select(X, Ys, Zs).
members(.(X, Xs), Ys) :- ','(member(X, Ys), members(Xs, Ys)).
members([], Ys).
member(X, .(X, X1)).
member(X, .(X2, T)) :- member(X, T).
test_color(Name, Map) :- ','(map(Name, Map), ','(colors(Name, Colors), color_map(Map, Colors))).
map(test, l(region(a, A, .(B, .(C, .(D, [])))), l(region(b, B, .(A, .(C, .(E, [])))), l(region(c, C, .(A, .(B, .(D, .(E, .(F, [])))))), l(region(d, D, .(A, .(C, .(F, [])))), l(region(e, E, .(B, .(C, .(F, [])))), l(region(f, F, .(C, .(D, .(E, [])))), nil))))))).
colors(X, .(red, .(yellow, .(blue, .(white, []))))).


Query: color_map(a,g)
----------------------------------------

(1) PrologToPiTRSProof (SOUND)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:

color_map_in_2: (f,b)

color_region_in_2: (f,b)

select_in_3: (f,b,f)

members_in_2: (f,b)

member_in_2: (f,b)

Transforming Prolog into the following Term Rewriting System:

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

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)





Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



----------------------------------------

(2)
Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)



----------------------------------------

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

   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
   COLOR_MAP_IN_AG(l(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, T)) -> U8_AG(X, X2, T, member_in_ag(X, T))
   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)
   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)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)

COLOR_REGION_IN_AG(x1, x2)  =  COLOR_REGION_IN_AG(x2)

U3_AG(x1, x2, x3, x4, x5)  =  U3_AG(x4, x5)

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x3, x5)

U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x2, x4, x5)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)

U8_AG(x1, x2, x3, x4)  =  U8_AG(x2, x3, x4)

U7_AG(x1, x2, x3, x4)  =  U7_AG(x1, x3, x4)

U2_AG(x1, x2, x3, x4)  =  U2_AG(x1, x3, x4)


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

(4)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
   COLOR_MAP_IN_AG(l(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, T)) -> U8_AG(X, X2, T, member_in_ag(X, T))
   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)
   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)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)

COLOR_REGION_IN_AG(x1, x2)  =  COLOR_REGION_IN_AG(x2)

U3_AG(x1, x2, x3, x4, x5)  =  U3_AG(x4, x5)

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x3, x5)

U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x2, x4, x5)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)

U8_AG(x1, x2, x3, x4)  =  U8_AG(x2, x3, x4)

U7_AG(x1, x2, x3, x4)  =  U7_AG(x1, x3, x4)

U2_AG(x1, x2, x3, x4)  =  U2_AG(x1, x3, x4)


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

(5) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 10 less nodes.
----------------------------------------

(6)
Complex Obligation (AND)

----------------------------------------

(7)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)


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

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

(9)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)

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

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)


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

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

(11)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   MEMBER_IN_AG(.(X2, T)) -> MEMBER_IN_AG(T)

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

(12) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*MEMBER_IN_AG(.(X2, T)) -> MEMBER_IN_AG(T)
The graph contains the following edges 1 > 1


----------------------------------------

(13)
YES

----------------------------------------

(14)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)


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

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

(16)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   member_in_ag(X, .(X, X1)) -> member_out_ag(X, .(X, X1))
   member_in_ag(X, .(X2, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)


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

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

(18)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   U6_AG(Ys, member_out_ag(X, Ys)) -> MEMBERS_IN_AG(Ys)
   MEMBERS_IN_AG(Ys) -> U6_AG(Ys, member_in_ag(Ys))

The TRS R consists of the following rules:

   member_in_ag(.(X, X1)) -> member_out_ag(X, .(X, X1))
   member_in_ag(.(X2, T)) -> U8_ag(X2, T, member_in_ag(T))
   U8_ag(X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The set Q consists of the following terms:

   member_in_ag(x0)
   U8_ag(x0, x1, x2)

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

(19) TransformationProof (SOUND)
By narrowing [LPAR04] the rule MEMBERS_IN_AG(Ys) -> U6_AG(Ys, member_in_ag(Ys)) at position [1] we obtained the following new rules [LPAR04]:

   (MEMBERS_IN_AG(.(x0, x1)) -> U6_AG(.(x0, x1), member_out_ag(x0, .(x0, x1))),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))),MEMBERS_IN_AG(.(x0, x1)) -> U6_AG(.(x0, x1), U8_ag(x0, x1, member_in_ag(x1))))


----------------------------------------

(20)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   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)))

The TRS R consists of the following rules:

   member_in_ag(.(X, X1)) -> member_out_ag(X, .(X, X1))
   member_in_ag(.(X2, T)) -> U8_ag(X2, T, member_in_ag(T))
   U8_ag(X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The set Q consists of the following terms:

   member_in_ag(x0)
   U8_ag(x0, x1, x2)

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

(21) TransformationProof (EQUIVALENT)
By instantiating [LPAR04] the rule U6_AG(Ys, member_out_ag(X, Ys)) -> MEMBERS_IN_AG(Ys) we obtained the following new rules [LPAR04]:

   (U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1))) -> MEMBERS_IN_AG(.(z0, z1)),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)),U6_AG(.(z0, z1), member_out_ag(x1, .(z0, z1))) -> MEMBERS_IN_AG(.(z0, z1)))


----------------------------------------

(22)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   member_in_ag(.(X, X1)) -> member_out_ag(X, .(X, X1))
   member_in_ag(.(X2, T)) -> U8_ag(X2, T, member_in_ag(T))
   U8_ag(X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The set Q consists of the following terms:

   member_in_ag(x0)
   U8_ag(x0, x1, x2)

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

(23) NonTerminationLoopProof (COMPLETE)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1))) evaluates to  t =U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1)))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
* Matcher: [ ]
* Semiunifier: [ ]

--------------------------------------------------------------------------------
Rewriting sequence

U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1))) -> MEMBERS_IN_AG(.(z0, z1))
with rule U6_AG(.(z0', z1'), member_out_ag(z0', .(z0', z1'))) -> MEMBERS_IN_AG(.(z0', z1')) at position [] and matcher [z0' / z0, z1' / z1]

MEMBERS_IN_AG(.(z0, z1)) -> U6_AG(.(z0, z1), member_out_ag(z0, .(z0, z1)))
with rule MEMBERS_IN_AG(.(x0, x1)) -> U6_AG(.(x0, x1), member_out_ag(x0, .(x0, x1)))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




----------------------------------------

(24)
NO

----------------------------------------

(25)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) -> SELECT_IN_AGA(X, Ys, Zs)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)


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

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

(27)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) -> SELECT_IN_AGA(X, Ys, Zs)

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

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)


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

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

(29)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   SELECT_IN_AGA(.(Y, Ys)) -> SELECT_IN_AGA(Ys)

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

(30) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*SELECT_IN_AGA(.(Y, Ys)) -> SELECT_IN_AGA(Ys)
The graph contains the following edges 1 > 1


----------------------------------------

(31)
YES

----------------------------------------

(32)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) -> COLOR_MAP_IN_AG(Regions, Colors)
   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x3, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1, x2)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)


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

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

(34)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) -> COLOR_MAP_IN_AG(Regions, Colors)
   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))

The TRS R consists of the following rules:

   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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) -> members_out_ag(.(X, Xs), Ys)
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The argument filtering Pi contains the following mapping:
color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x4, x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x2, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x3, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x4, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1, x2)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x2, x3, x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x3, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1, x2)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)


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

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

(36)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   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, T)) -> U8_ag(X2, T, member_in_ag(T))
   U7_ag(X, Ys, members_out_ag(Xs, Ys)) -> members_out_ag(.(X, Xs), Ys)
   U8_ag(X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The set Q consists of the following terms:

   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)

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

(37) PrologToPiTRSProof (SOUND)
We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:

color_map_in_2: (f,b)

color_region_in_2: (f,b)

select_in_3: (f,b,f)

members_in_2: (f,b)

member_in_2: (f,b)

Transforming Prolog into the following Term Rewriting System:

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

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)





Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



----------------------------------------

(38)
Obligation:
Pi-finite rewrite system:
The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)



----------------------------------------

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

   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
   COLOR_MAP_IN_AG(l(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, T)) -> U8_AG(X, X2, T, member_in_ag(X, T))
   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)
   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)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)

COLOR_REGION_IN_AG(x1, x2)  =  COLOR_REGION_IN_AG(x2)

U3_AG(x1, x2, x3, x4, x5)  =  U3_AG(x5)

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x5)

U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x2, x5)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)

U8_AG(x1, x2, x3, x4)  =  U8_AG(x4)

U7_AG(x1, x2, x3, x4)  =  U7_AG(x1, x4)

U2_AG(x1, x2, x3, x4)  =  U2_AG(x1, x4)


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

(40)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))
   COLOR_MAP_IN_AG(l(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, T)) -> U8_AG(X, X2, T, member_in_ag(X, T))
   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)
   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)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)

COLOR_REGION_IN_AG(x1, x2)  =  COLOR_REGION_IN_AG(x2)

U3_AG(x1, x2, x3, x4, x5)  =  U3_AG(x5)

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)

U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x5)

U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x2, x5)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)

U8_AG(x1, x2, x3, x4)  =  U8_AG(x4)

U7_AG(x1, x2, x3, x4)  =  U7_AG(x1, x4)

U2_AG(x1, x2, x3, x4)  =  U2_AG(x1, x4)


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

(41) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 10 less nodes.
----------------------------------------

(42)
Complex Obligation (AND)

----------------------------------------

(43)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)


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

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

(45)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBER_IN_AG(X, .(X2, T)) -> MEMBER_IN_AG(X, T)

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

MEMBER_IN_AG(x1, x2)  =  MEMBER_IN_AG(x2)


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

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

(47)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   MEMBER_IN_AG(.(X2, T)) -> MEMBER_IN_AG(T)

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

(48) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*MEMBER_IN_AG(.(X2, T)) -> MEMBER_IN_AG(T)
The graph contains the following edges 1 > 1


----------------------------------------

(49)
YES

----------------------------------------

(50)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)


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

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

(52)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   member_in_ag(X, .(X, X1)) -> member_out_ag(X, .(X, X1))
   member_in_ag(X, .(X2, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

MEMBERS_IN_AG(x1, x2)  =  MEMBERS_IN_AG(x2)

U6_AG(x1, x2, x3, x4)  =  U6_AG(x3, x4)


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

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

(54)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   U6_AG(Ys, member_out_ag(X)) -> MEMBERS_IN_AG(Ys)
   MEMBERS_IN_AG(Ys) -> U6_AG(Ys, member_in_ag(Ys))

The TRS R consists of the following rules:

   member_in_ag(.(X, X1)) -> member_out_ag(X)
   member_in_ag(.(X2, T)) -> U8_ag(member_in_ag(T))
   U8_ag(member_out_ag(X)) -> member_out_ag(X)

The set Q consists of the following terms:

   member_in_ag(x0)
   U8_ag(x0)

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

(55) TransformationProof (SOUND)
By narrowing [LPAR04] the rule MEMBERS_IN_AG(Ys) -> U6_AG(Ys, member_in_ag(Ys)) at position [1] we obtained the following new rules [LPAR04]:

   (MEMBERS_IN_AG(.(x0, x1)) -> U6_AG(.(x0, x1), member_out_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))),MEMBERS_IN_AG(.(x0, x1)) -> U6_AG(.(x0, x1), U8_ag(member_in_ag(x1))))


----------------------------------------

(56)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   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)))

The TRS R consists of the following rules:

   member_in_ag(.(X, X1)) -> member_out_ag(X)
   member_in_ag(.(X2, T)) -> U8_ag(member_in_ag(T))
   U8_ag(member_out_ag(X)) -> member_out_ag(X)

The set Q consists of the following terms:

   member_in_ag(x0)
   U8_ag(x0)

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

(57) TransformationProof (EQUIVALENT)
By instantiating [LPAR04] the rule U6_AG(Ys, member_out_ag(X)) -> MEMBERS_IN_AG(Ys) we obtained the following new rules [LPAR04]:

   (U6_AG(.(z0, z1), member_out_ag(z0)) -> MEMBERS_IN_AG(.(z0, z1)),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)),U6_AG(.(z0, z1), member_out_ag(x1)) -> MEMBERS_IN_AG(.(z0, z1)))


----------------------------------------

(58)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   member_in_ag(.(X, X1)) -> member_out_ag(X)
   member_in_ag(.(X2, T)) -> U8_ag(member_in_ag(T))
   U8_ag(member_out_ag(X)) -> member_out_ag(X)

The set Q consists of the following terms:

   member_in_ag(x0)
   U8_ag(x0)

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

(59) NonTerminationLoopProof (COMPLETE)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U6_AG(.(z0, z1), member_out_ag(z0)) evaluates to  t =U6_AG(.(z0, z1), member_out_ag(z0))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
* Matcher: [ ]
* Semiunifier: [ ]

--------------------------------------------------------------------------------
Rewriting sequence

U6_AG(.(z0, z1), member_out_ag(z0)) -> MEMBERS_IN_AG(.(z0, z1))
with rule U6_AG(.(z0', z1'), member_out_ag(z0')) -> MEMBERS_IN_AG(.(z0', z1')) at position [] and matcher [z0' / z0, z1' / z1]

MEMBERS_IN_AG(.(z0, z1)) -> U6_AG(.(z0, z1), member_out_ag(z0))
with rule MEMBERS_IN_AG(.(x0, x1)) -> U6_AG(.(x0, x1), member_out_ag(x0))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




----------------------------------------

(60)
NO

----------------------------------------

(61)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) -> SELECT_IN_AGA(X, Ys, Zs)

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)


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

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

(63)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   SELECT_IN_AGA(X, .(Y, Ys), .(Y, Zs)) -> SELECT_IN_AGA(X, Ys, Zs)

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

SELECT_IN_AGA(x1, x2, x3)  =  SELECT_IN_AGA(x2)


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

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

(65)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   SELECT_IN_AGA(.(Y, Ys)) -> SELECT_IN_AGA(Ys)

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

(66) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*SELECT_IN_AGA(.(Y, Ys)) -> SELECT_IN_AGA(Ys)
The graph contains the following edges 1 > 1


----------------------------------------

(67)
YES

----------------------------------------

(68)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) -> COLOR_MAP_IN_AG(Regions, Colors)
   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))

The TRS R consists of the following rules:

   color_map_in_ag(l(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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))
   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(nil, Colors) -> color_map_out_ag(nil, Colors)
   U2_ag(Region, Regions, Colors, color_map_out_ag(Regions, Colors)) -> color_map_out_ag(l(Region, Regions), Colors)

The argument filtering Pi contains the following mapping:
color_map_in_ag(x1, x2)  =  color_map_in_ag(x2)

U1_ag(x1, x2, x3, x4)  =  U1_ag(x3, x4)

color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

U2_ag(x1, x2, x3, x4)  =  U2_ag(x1, x4)

color_map_out_ag(x1, x2)  =  color_map_out_ag(x1)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)


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

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

(70)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   U1_AG(Region, Regions, Colors, color_region_out_ag(Region, Colors)) -> COLOR_MAP_IN_AG(Regions, Colors)
   COLOR_MAP_IN_AG(l(Region, Regions), Colors) -> U1_AG(Region, Regions, Colors, color_region_in_ag(Region, Colors))

The TRS R consists of the following rules:

   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, T)) -> U8_ag(X, X2, T, member_in_ag(X, T))
   U7_ag(X, Xs, Ys, members_out_ag(Xs, Ys)) -> members_out_ag(.(X, Xs), Ys)
   U8_ag(X, X2, T, member_out_ag(X, T)) -> member_out_ag(X, .(X2, T))

The argument filtering Pi contains the following mapping:
color_region_in_ag(x1, x2)  =  color_region_in_ag(x2)

U3_ag(x1, x2, x3, x4, x5)  =  U3_ag(x5)

select_in_aga(x1, x2, x3)  =  select_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

select_out_aga(x1, x2, x3)  =  select_out_aga(x1, x3)

U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)

U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x2, x5)

members_in_ag(x1, x2)  =  members_in_ag(x2)

U6_ag(x1, x2, x3, x4)  =  U6_ag(x3, x4)

member_in_ag(x1, x2)  =  member_in_ag(x2)

member_out_ag(x1, x2)  =  member_out_ag(x1)

U8_ag(x1, x2, x3, x4)  =  U8_ag(x4)

U7_ag(x1, x2, x3, x4)  =  U7_ag(x1, x4)

members_out_ag(x1, x2)  =  members_out_ag(x1)

color_region_out_ag(x1, x2)  =  color_region_out_ag(x1)

region(x1, x2, x3)  =  region(x2, x3)

l(x1, x2)  =  l(x1, x2)

COLOR_MAP_IN_AG(x1, x2)  =  COLOR_MAP_IN_AG(x2)

U1_AG(x1, x2, x3, x4)  =  U1_AG(x3, x4)


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

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

(72)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   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))

The TRS R consists of the following rules:

   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, T)) -> U8_ag(member_in_ag(T))
   U7_ag(X, members_out_ag(Xs)) -> members_out_ag(.(X, Xs))
   U8_ag(member_out_ag(X)) -> member_out_ag(X)

The set Q consists of the following terms:

   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)

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

(73) PrologToDTProblemTransformerProof (SOUND)
Built DT problem from termination graph DT10.

{
    "root": 3,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(color_map (l Region Regions) Colors)",
                "(',' (color_region Region Colors) (color_map Regions Colors))"
            ],
            [
                "(color_map (nil) Colors)",
                null
            ],
            [
                "(color_region (region Name Color Neighbors) Colors)",
                "(',' (select Color Colors Colors1) (members Neighbors Colors1))"
            ],
            [
                "(select X (. X Xs) Xs)",
                null
            ],
            [
                "(select X (. Y Ys) (. Y Zs))",
                "(select X Ys Zs)"
            ],
            [
                "(members (. X Xs) Ys)",
                "(',' (member X Ys) (members Xs Ys))"
            ],
            [
                "(members ([]) Ys)",
                null
            ],
            [
                "(member X (. X X1))",
                null
            ],
            [
                "(member X (. X2 T))",
                "(member X T)"
            ],
            [
                "(test_color Name Map)",
                "(',' (map Name Map) (',' (colors Name Colors) (color_map Map Colors)))"
            ],
            [
                "(map (test) (l (region (a) A (. B (. C (. D ([]))))) (l (region (b) B (. A (. C (. E ([]))))) (l (region (c) C (. A (. B (. D (. E (. F ([]))))))) (l (region (d) D (. A (. C (. F ([]))))) (l (region (e) E (. B (. C (. F ([]))))) (l (region (f) F (. C (. D (. E ([]))))) (nil))))))))",
                null
            ],
            [
                "(colors X (. (red) (. (yellow) (. (blue) (. (white) ([]))))))",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "22": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(select T31 T30 X31)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T30"],
                    "free": ["X31"],
                    "exprvars": []
                }
            },
            "66": {
                "goal": [{
                    "clause": 5,
                    "scope": 4,
                    "term": "(members T39 T38)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T38"],
                    "free": [],
                    "exprvars": []
                }
            },
            "23": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (members T39 T38) (color_map T40 T30))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [
                        "T30",
                        "T38"
                    ],
                    "free": [],
                    "exprvars": []
                }
            },
            "67": {
                "goal": [{
                    "clause": 6,
                    "scope": 4,
                    "term": "(members T39 T38)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T38"],
                    "free": [],
                    "exprvars": []
                }
            },
            "26": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 3,
                        "term": "(select T31 T30 X31)"
                    },
                    {
                        "clause": 4,
                        "scope": 3,
                        "term": "(select T31 T30 X31)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T30"],
                    "free": ["X31"],
                    "exprvars": []
                }
            },
            "27": {
                "goal": [{
                    "clause": 3,
                    "scope": 3,
                    "term": "(select T31 T30 X31)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T30"],
                    "free": ["X31"],
                    "exprvars": []
                }
            },
            "28": {
                "goal": [{
                    "clause": 4,
                    "scope": 3,
                    "term": "(select T31 T30 X31)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T30"],
                    "free": ["X31"],
                    "exprvars": []
                }
            },
            "29": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "293": {
                "goal": [{
                    "clause": 7,
                    "scope": 5,
                    "term": "(member T91 T90)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T90"],
                    "free": [],
                    "exprvars": []
                }
            },
            "294": {
                "goal": [{
                    "clause": 8,
                    "scope": 5,
                    "term": "(member T91 T90)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T90"],
                    "free": [],
                    "exprvars": []
                }
            },
            "252": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (member T91 T90) (members T92 T90))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T90"],
                    "free": [],
                    "exprvars": []
                }
            },
            "253": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "615": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(color_map T1 T8)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T8"],
                    "free": [],
                    "exprvars": []
                }
            },
            "30": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "519": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "31": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "619": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "32": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(select T64 T63 X64)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T63"],
                    "free": ["X64"],
                    "exprvars": []
                }
            },
            "33": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "13": {
                "goal": [
                    {
                        "clause": -1,
                        "scope": -1,
                        "term": "(',' (color_region T9 T8) (color_map T10 T8))"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(color_map T1 T8)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T8"],
                    "free": [],
                    "exprvars": []
                }
            },
            "14": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [[
                        "(color_map T1 T2)",
                        "(color_map (l X6 X7) X8)"
                    ]],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [
                        "X6",
                        "X7",
                        "X8"
                    ],
                    "exprvars": []
                }
            },
            "15": {
                "goal": [
                    {
                        "clause": 2,
                        "scope": 2,
                        "term": "(',' (color_region T9 T8) (color_map T10 T8))"
                    },
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(color_map T1 T8)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T8"],
                    "free": [],
                    "exprvars": []
                }
            },
            "16": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(',' (color_region T9 T8) (color_map T10 T8))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T8"],
                    "free": [],
                    "exprvars": []
                }
            },
            "17": {
                "goal": [
                    {
                        "clause": -1,
                        "scope": 2,
                        "term": null
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(color_map T1 T8)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T8"],
                    "free": [],
                    "exprvars": []
                }
            },
            "18": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (',' (select T31 T30 X31) (members T32 X31)) (color_map T33 T30))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T30"],
                    "free": ["X31"],
                    "exprvars": []
                }
            },
            "19": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "262": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(member T91 T90)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T90"],
                    "free": [],
                    "exprvars": []
                }
            },
            "263": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(members T97 T90)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T90"],
                    "free": [],
                    "exprvars": []
                }
            },
            "485": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "486": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "3": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "267": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 5,
                        "term": "(member T91 T90)"
                    },
                    {
                        "clause": 8,
                        "scope": 5,
                        "term": "(member T91 T90)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T90"],
                    "free": [],
                    "exprvars": []
                }
            },
            "520": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "488": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "620": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "5": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(color_map T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(color_map T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "621": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "523": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "504": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(member T121 T120)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T120"],
                    "free": [],
                    "exprvars": []
                }
            },
            "625": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "505": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "626": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "61": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(members T39 T38)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T38"],
                    "free": [],
                    "exprvars": []
                }
            },
            "627": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "62": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_map T72 T30)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T30"],
                    "free": [],
                    "exprvars": []
                }
            },
            "63": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 4,
                        "term": "(members T39 T38)"
                    },
                    {
                        "clause": 6,
                        "scope": 4,
                        "term": "(members T39 T38)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T38"],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 3,
                "to": 5,
                "label": "CASE"
            },
            {
                "from": 5,
                "to": 13,
                "label": "EVAL with clause\ncolor_map(l(X6, X7), X8) :- ','(color_region(X6, X8), color_map(X7, X8)).\nand substitutionX6 -> T9,\nX7 -> T10,\nT1 -> l(T9, T10),\nT2 -> T8,\nX8 -> T8,\nT6 -> T9,\nT7 -> T10"
            },
            {
                "from": 5,
                "to": 14,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 13,
                "to": 15,
                "label": "CASE"
            },
            {
                "from": 14,
                "to": 625,
                "label": "EVAL with clause\ncolor_map(nil, X134).\nand substitutionT1 -> nil,\nT2 -> T139,\nX134 -> T139"
            },
            {
                "from": 14,
                "to": 626,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 15,
                "to": 16,
                "label": "PARALLEL"
            },
            {
                "from": 15,
                "to": 17,
                "label": "PARALLEL"
            },
            {
                "from": 16,
                "to": 18,
                "label": "EVAL with clause\ncolor_region(region(X27, X28, X29), X30) :- ','(select(X28, X30, X31), members(X29, X31)).\nand substitutionX27 -> T27,\nX28 -> T31,\nX29 -> T32,\nT9 -> region(T27, T31, T32),\nT8 -> T30,\nX30 -> T30,\nT28 -> T31,\nT29 -> T32,\nT10 -> T33"
            },
            {
                "from": 16,
                "to": 19,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 17,
                "to": 615,
                "label": "FAILURE"
            },
            {
                "from": 18,
                "to": 22,
                "label": "SPLIT 1"
            },
            {
                "from": 18,
                "to": 23,
                "label": "SPLIT 2\nnew knowledge:\nT31 is ground\nT30 is ground\nT38 is ground\nreplacements:X31 -> T38,\nT32 -> T39,\nT33 -> T40"
            },
            {
                "from": 22,
                "to": 26,
                "label": "CASE"
            },
            {
                "from": 23,
                "to": 61,
                "label": "SPLIT 1"
            },
            {
                "from": 23,
                "to": 62,
                "label": "SPLIT 2\nnew knowledge:\nT39 is ground\nT38 is ground\nreplacements:T40 -> T72"
            },
            {
                "from": 26,
                "to": 27,
                "label": "PARALLEL"
            },
            {
                "from": 26,
                "to": 28,
                "label": "PARALLEL"
            },
            {
                "from": 27,
                "to": 29,
                "label": "EVAL with clause\nselect(X48, .(X48, X49), X49).\nand substitutionT31 -> T53,\nX48 -> T53,\nX49 -> T54,\nT30 -> .(T53, T54),\nX31 -> T54"
            },
            {
                "from": 27,
                "to": 30,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 28,
                "to": 32,
                "label": "EVAL with clause\nselect(X60, .(X61, X62), .(X61, X63)) :- select(X60, X62, X63).\nand substitutionT31 -> T64,\nX60 -> T64,\nX61 -> T62,\nX62 -> T63,\nT30 -> .(T62, T63),\nX63 -> X64,\nX31 -> .(T62, X64),\nT61 -> T64"
            },
            {
                "from": 28,
                "to": 33,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 29,
                "to": 31,
                "label": "SUCCESS"
            },
            {
                "from": 32,
                "to": 22,
                "label": "INSTANCE with matching:\nT31 -> T64\nT30 -> T63\nX31 -> X64"
            },
            {
                "from": 61,
                "to": 63,
                "label": "CASE"
            },
            {
                "from": 62,
                "to": 3,
                "label": "INSTANCE with matching:\nT1 -> T72\nT2 -> T30"
            },
            {
                "from": 63,
                "to": 66,
                "label": "PARALLEL"
            },
            {
                "from": 63,
                "to": 67,
                "label": "PARALLEL"
            },
            {
                "from": 66,
                "to": 252,
                "label": "EVAL with clause\nmembers(.(X87, X88), X89) :- ','(member(X87, X89), members(X88, X89)).\nand substitutionX87 -> T91,\nX88 -> T92,\nT39 -> .(T91, T92),\nT38 -> T90,\nX89 -> T90,\nT88 -> T91,\nT89 -> T92"
            },
            {
                "from": 66,
                "to": 253,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 67,
                "to": 519,
                "label": "EVAL with clause\nmembers([], X126).\nand substitutionT39 -> [],\nT38 -> T131,\nX126 -> T131"
            },
            {
                "from": 67,
                "to": 520,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 252,
                "to": 262,
                "label": "SPLIT 1"
            },
            {
                "from": 252,
                "to": 263,
                "label": "SPLIT 2\nnew knowledge:\nT91 is ground\nT90 is ground\nreplacements:T92 -> T97"
            },
            {
                "from": 262,
                "to": 267,
                "label": "CASE"
            },
            {
                "from": 263,
                "to": 61,
                "label": "INSTANCE with matching:\nT39 -> T97\nT38 -> T90"
            },
            {
                "from": 267,
                "to": 293,
                "label": "PARALLEL"
            },
            {
                "from": 267,
                "to": 294,
                "label": "PARALLEL"
            },
            {
                "from": 293,
                "to": 485,
                "label": "EVAL with clause\nmember(X106, .(X106, X107)).\nand substitutionT91 -> T110,\nX106 -> T110,\nX107 -> T111,\nT90 -> .(T110, T111)"
            },
            {
                "from": 293,
                "to": 486,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 294,
                "to": 504,
                "label": "EVAL with clause\nmember(X114, .(X115, X116)) :- member(X114, X116).\nand substitutionT91 -> T121,\nX114 -> T121,\nX115 -> T119,\nX116 -> T120,\nT90 -> .(T119, T120),\nT118 -> T121"
            },
            {
                "from": 294,
                "to": 505,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 485,
                "to": 488,
                "label": "SUCCESS"
            },
            {
                "from": 504,
                "to": 262,
                "label": "INSTANCE with matching:\nT91 -> T121\nT90 -> T120"
            },
            {
                "from": 519,
                "to": 523,
                "label": "SUCCESS"
            },
            {
                "from": 615,
                "to": 619,
                "label": "EVAL with clause\ncolor_map(nil, X132).\nand substitutionT1 -> nil,\nT8 -> T137,\nX132 -> T137"
            },
            {
                "from": 615,
                "to": 620,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 619,
                "to": 621,
                "label": "SUCCESS"
            },
            {
                "from": 625,
                "to": 627,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(74)
Obligation:
Triples:

selectA(X1, .(X2, X3), .(X2, X4)) :- selectA(X1, X3, X4).
membersC(.(X1, X2), X3) :- memberD(X1, X3).
membersC(.(X1, X2), X3) :- ','(membercD(X1, X3), membersC(X2, X3)).
memberD(X1, .(X2, X3)) :- memberD(X1, X3).
color_mapB(l(region(X1, X2, X3), X4), X5) :- selectA(X2, X5, X6).
color_mapB(l(region(X1, X2, X3), X4), X5) :- ','(selectcA(X2, X5, X6), membersC(X3, X6)).
color_mapB(l(region(X1, X2, X3), X4), X5) :- ','(selectcA(X2, X5, X6), ','(memberscC(X3, X6), color_mapB(X4, X5))).

Clauses:

selectcA(X1, .(X1, X2), X2).
selectcA(X1, .(X2, X3), .(X2, X4)) :- selectcA(X1, X3, X4).
color_mapcB(l(region(X1, X2, X3), X4), X5) :- ','(selectcA(X2, X5, X6), ','(memberscC(X3, X6), color_mapcB(X4, X5))).
color_mapcB(nil, X1).
color_mapcB(nil, X1).
memberscC(.(X1, X2), X3) :- ','(membercD(X1, X3), memberscC(X2, X3)).
memberscC([], X1).
membercD(X1, .(X1, X2)).
membercD(X1, .(X2, X3)) :- membercD(X1, X3).

Afs:

color_mapB(x1, x2)  =  color_mapB(x2)


----------------------------------------

(75) TriplesToPiDPProof (SOUND)
We use the technique of [DT09]. With regard to the inferred argument filtering the predicates were used in the following modes:

color_mapB_in_2: (f,b)

selectA_in_3: (f,b,f)

selectcA_in_3: (f,b,f)

membersC_in_2: (f,b)

memberD_in_2: (f,b)

membercD_in_2: (f,b)

memberscC_in_2: (f,b)

Transforming TRIPLES into the following Term Rewriting System:

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

   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> U6_AG(X1, X2, X3, X4, X5, selectA_in_aga(X2, X5, X6))
   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> SELECTA_IN_AGA(X2, X5, X6)
   SELECTA_IN_AGA(X1, .(X2, X3), .(X2, X4)) -> U1_AGA(X1, X2, X3, X4, selectA_in_aga(X1, X3, X4))
   SELECTA_IN_AGA(X1, .(X2, X3), .(X2, X4)) -> SELECTA_IN_AGA(X1, X3, X4)
   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> U7_AG(X1, X2, X3, X4, X5, selectcA_in_aga(X2, X5, X6))
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> U8_AG(X1, X2, X3, X4, X5, membersC_in_ag(X3, X6))
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> MEMBERSC_IN_AG(X3, X6)
   MEMBERSC_IN_AG(.(X1, X2), X3) -> U2_AG(X1, X2, X3, memberD_in_ag(X1, X3))
   MEMBERSC_IN_AG(.(X1, X2), X3) -> MEMBERD_IN_AG(X1, X3)
   MEMBERD_IN_AG(X1, .(X2, X3)) -> U5_AG(X1, X2, X3, memberD_in_ag(X1, X3))
   MEMBERD_IN_AG(X1, .(X2, X3)) -> MEMBERD_IN_AG(X1, X3)
   MEMBERSC_IN_AG(.(X1, X2), X3) -> U3_AG(X1, X2, X3, membercD_in_ag(X1, X3))
   U3_AG(X1, X2, X3, membercD_out_ag(X1, X3)) -> U4_AG(X1, X2, X3, membersC_in_ag(X2, X3))
   U3_AG(X1, X2, X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X2, X3)
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> U9_AG(X1, X2, X3, X4, X5, memberscC_in_ag(X3, X6))
   U9_AG(X1, X2, X3, X4, X5, memberscC_out_ag(X3, X6)) -> U10_AG(X1, X2, X3, X4, X5, color_mapB_in_ag(X4, X5))
   U9_AG(X1, X2, X3, X4, X5, memberscC_out_ag(X3, X6)) -> COLOR_MAPB_IN_AG(X4, X5)

The TRS R consists of the following rules:

   selectcA_in_aga(X1, .(X1, X2), X2) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(X1, .(X2, X3), .(X2, X4)) -> U12_aga(X1, X2, X3, X4, selectcA_in_aga(X1, X3, X4))
   U12_aga(X1, X2, X3, X4, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(.(X1, X2), X3) -> U16_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U16_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X2, X3, memberscC_in_ag(X2, X3))
   memberscC_in_ag([], X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X2, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The argument filtering Pi contains the following mapping:
color_mapB_in_ag(x1, x2)  =  color_mapB_in_ag(x2)

selectA_in_aga(x1, x2, x3)  =  selectA_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

selectcA_in_aga(x1, x2, x3)  =  selectcA_in_aga(x2)

selectcA_out_aga(x1, x2, x3)  =  selectcA_out_aga(x1, x2, x3)

U12_aga(x1, x2, x3, x4, x5)  =  U12_aga(x2, x3, x5)

membersC_in_ag(x1, x2)  =  membersC_in_ag(x2)

memberD_in_ag(x1, x2)  =  memberD_in_ag(x2)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

memberscC_in_ag(x1, x2)  =  memberscC_in_ag(x2)

U16_ag(x1, x2, x3, x4)  =  U16_ag(x3, x4)

U17_ag(x1, x2, x3, x4)  =  U17_ag(x1, x3, x4)

memberscC_out_ag(x1, x2)  =  memberscC_out_ag(x1, x2)

COLOR_MAPB_IN_AG(x1, x2)  =  COLOR_MAPB_IN_AG(x2)

U6_AG(x1, x2, x3, x4, x5, x6)  =  U6_AG(x5, x6)

SELECTA_IN_AGA(x1, x2, x3)  =  SELECTA_IN_AGA(x2)

U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x2, x3, x5)

U7_AG(x1, x2, x3, x4, x5, x6)  =  U7_AG(x5, x6)

U8_AG(x1, x2, x3, x4, x5, x6)  =  U8_AG(x5, x6)

MEMBERSC_IN_AG(x1, x2)  =  MEMBERSC_IN_AG(x2)

U2_AG(x1, x2, x3, x4)  =  U2_AG(x3, x4)

MEMBERD_IN_AG(x1, x2)  =  MEMBERD_IN_AG(x2)

U5_AG(x1, x2, x3, x4)  =  U5_AG(x2, x3, x4)

U3_AG(x1, x2, x3, x4)  =  U3_AG(x3, x4)

U4_AG(x1, x2, x3, x4)  =  U4_AG(x3, x4)

U9_AG(x1, x2, x3, x4, x5, x6)  =  U9_AG(x5, x6)

U10_AG(x1, x2, x3, x4, x5, x6)  =  U10_AG(x5, x6)


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


Infinitary Constructor Rewriting Termination of PiDP implies Termination of TRIPLES



----------------------------------------

(76)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> U6_AG(X1, X2, X3, X4, X5, selectA_in_aga(X2, X5, X6))
   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> SELECTA_IN_AGA(X2, X5, X6)
   SELECTA_IN_AGA(X1, .(X2, X3), .(X2, X4)) -> U1_AGA(X1, X2, X3, X4, selectA_in_aga(X1, X3, X4))
   SELECTA_IN_AGA(X1, .(X2, X3), .(X2, X4)) -> SELECTA_IN_AGA(X1, X3, X4)
   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> U7_AG(X1, X2, X3, X4, X5, selectcA_in_aga(X2, X5, X6))
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> U8_AG(X1, X2, X3, X4, X5, membersC_in_ag(X3, X6))
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> MEMBERSC_IN_AG(X3, X6)
   MEMBERSC_IN_AG(.(X1, X2), X3) -> U2_AG(X1, X2, X3, memberD_in_ag(X1, X3))
   MEMBERSC_IN_AG(.(X1, X2), X3) -> MEMBERD_IN_AG(X1, X3)
   MEMBERD_IN_AG(X1, .(X2, X3)) -> U5_AG(X1, X2, X3, memberD_in_ag(X1, X3))
   MEMBERD_IN_AG(X1, .(X2, X3)) -> MEMBERD_IN_AG(X1, X3)
   MEMBERSC_IN_AG(.(X1, X2), X3) -> U3_AG(X1, X2, X3, membercD_in_ag(X1, X3))
   U3_AG(X1, X2, X3, membercD_out_ag(X1, X3)) -> U4_AG(X1, X2, X3, membersC_in_ag(X2, X3))
   U3_AG(X1, X2, X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X2, X3)
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> U9_AG(X1, X2, X3, X4, X5, memberscC_in_ag(X3, X6))
   U9_AG(X1, X2, X3, X4, X5, memberscC_out_ag(X3, X6)) -> U10_AG(X1, X2, X3, X4, X5, color_mapB_in_ag(X4, X5))
   U9_AG(X1, X2, X3, X4, X5, memberscC_out_ag(X3, X6)) -> COLOR_MAPB_IN_AG(X4, X5)

The TRS R consists of the following rules:

   selectcA_in_aga(X1, .(X1, X2), X2) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(X1, .(X2, X3), .(X2, X4)) -> U12_aga(X1, X2, X3, X4, selectcA_in_aga(X1, X3, X4))
   U12_aga(X1, X2, X3, X4, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(.(X1, X2), X3) -> U16_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U16_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X2, X3, memberscC_in_ag(X2, X3))
   memberscC_in_ag([], X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X2, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The argument filtering Pi contains the following mapping:
color_mapB_in_ag(x1, x2)  =  color_mapB_in_ag(x2)

selectA_in_aga(x1, x2, x3)  =  selectA_in_aga(x2)

.(x1, x2)  =  .(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

selectcA_in_aga(x1, x2, x3)  =  selectcA_in_aga(x2)

selectcA_out_aga(x1, x2, x3)  =  selectcA_out_aga(x1, x2, x3)

U12_aga(x1, x2, x3, x4, x5)  =  U12_aga(x2, x3, x5)

membersC_in_ag(x1, x2)  =  membersC_in_ag(x2)

memberD_in_ag(x1, x2)  =  memberD_in_ag(x2)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

memberscC_in_ag(x1, x2)  =  memberscC_in_ag(x2)

U16_ag(x1, x2, x3, x4)  =  U16_ag(x3, x4)

U17_ag(x1, x2, x3, x4)  =  U17_ag(x1, x3, x4)

memberscC_out_ag(x1, x2)  =  memberscC_out_ag(x1, x2)

COLOR_MAPB_IN_AG(x1, x2)  =  COLOR_MAPB_IN_AG(x2)

U6_AG(x1, x2, x3, x4, x5, x6)  =  U6_AG(x5, x6)

SELECTA_IN_AGA(x1, x2, x3)  =  SELECTA_IN_AGA(x2)

U1_AGA(x1, x2, x3, x4, x5)  =  U1_AGA(x2, x3, x5)

U7_AG(x1, x2, x3, x4, x5, x6)  =  U7_AG(x5, x6)

U8_AG(x1, x2, x3, x4, x5, x6)  =  U8_AG(x5, x6)

MEMBERSC_IN_AG(x1, x2)  =  MEMBERSC_IN_AG(x2)

U2_AG(x1, x2, x3, x4)  =  U2_AG(x3, x4)

MEMBERD_IN_AG(x1, x2)  =  MEMBERD_IN_AG(x2)

U5_AG(x1, x2, x3, x4)  =  U5_AG(x2, x3, x4)

U3_AG(x1, x2, x3, x4)  =  U3_AG(x3, x4)

U4_AG(x1, x2, x3, x4)  =  U4_AG(x3, x4)

U9_AG(x1, x2, x3, x4, x5, x6)  =  U9_AG(x5, x6)

U10_AG(x1, x2, x3, x4, x5, x6)  =  U10_AG(x5, x6)


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

(77) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LOPSTR] contains 4 SCCs with 10 less nodes.
----------------------------------------

(78)
Complex Obligation (AND)

----------------------------------------

(79)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBERD_IN_AG(X1, .(X2, X3)) -> MEMBERD_IN_AG(X1, X3)

The TRS R consists of the following rules:

   selectcA_in_aga(X1, .(X1, X2), X2) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(X1, .(X2, X3), .(X2, X4)) -> U12_aga(X1, X2, X3, X4, selectcA_in_aga(X1, X3, X4))
   U12_aga(X1, X2, X3, X4, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(.(X1, X2), X3) -> U16_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U16_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X2, X3, memberscC_in_ag(X2, X3))
   memberscC_in_ag([], X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X2, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

selectcA_in_aga(x1, x2, x3)  =  selectcA_in_aga(x2)

selectcA_out_aga(x1, x2, x3)  =  selectcA_out_aga(x1, x2, x3)

U12_aga(x1, x2, x3, x4, x5)  =  U12_aga(x2, x3, x5)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

memberscC_in_ag(x1, x2)  =  memberscC_in_ag(x2)

U16_ag(x1, x2, x3, x4)  =  U16_ag(x3, x4)

U17_ag(x1, x2, x3, x4)  =  U17_ag(x1, x3, x4)

memberscC_out_ag(x1, x2)  =  memberscC_out_ag(x1, x2)

MEMBERD_IN_AG(x1, x2)  =  MEMBERD_IN_AG(x2)


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

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

(81)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBERD_IN_AG(X1, .(X2, X3)) -> MEMBERD_IN_AG(X1, X3)

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

MEMBERD_IN_AG(x1, x2)  =  MEMBERD_IN_AG(x2)


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

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

(83)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   MEMBERD_IN_AG(.(X2, X3)) -> MEMBERD_IN_AG(X3)

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

(84) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*MEMBERD_IN_AG(.(X2, X3)) -> MEMBERD_IN_AG(X3)
The graph contains the following edges 1 > 1


----------------------------------------

(85)
YES

----------------------------------------

(86)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBERSC_IN_AG(.(X1, X2), X3) -> U3_AG(X1, X2, X3, membercD_in_ag(X1, X3))
   U3_AG(X1, X2, X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X2, X3)

The TRS R consists of the following rules:

   selectcA_in_aga(X1, .(X1, X2), X2) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(X1, .(X2, X3), .(X2, X4)) -> U12_aga(X1, X2, X3, X4, selectcA_in_aga(X1, X3, X4))
   U12_aga(X1, X2, X3, X4, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(.(X1, X2), X3) -> U16_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U16_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X2, X3, memberscC_in_ag(X2, X3))
   memberscC_in_ag([], X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X2, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

selectcA_in_aga(x1, x2, x3)  =  selectcA_in_aga(x2)

selectcA_out_aga(x1, x2, x3)  =  selectcA_out_aga(x1, x2, x3)

U12_aga(x1, x2, x3, x4, x5)  =  U12_aga(x2, x3, x5)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

memberscC_in_ag(x1, x2)  =  memberscC_in_ag(x2)

U16_ag(x1, x2, x3, x4)  =  U16_ag(x3, x4)

U17_ag(x1, x2, x3, x4)  =  U17_ag(x1, x3, x4)

memberscC_out_ag(x1, x2)  =  memberscC_out_ag(x1, x2)

MEMBERSC_IN_AG(x1, x2)  =  MEMBERSC_IN_AG(x2)

U3_AG(x1, x2, x3, x4)  =  U3_AG(x3, x4)


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

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

(88)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   MEMBERSC_IN_AG(.(X1, X2), X3) -> U3_AG(X1, X2, X3, membercD_in_ag(X1, X3))
   U3_AG(X1, X2, X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X2, X3)

The TRS R consists of the following rules:

   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

MEMBERSC_IN_AG(x1, x2)  =  MEMBERSC_IN_AG(x2)

U3_AG(x1, x2, x3, x4)  =  U3_AG(x3, x4)


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

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

(90)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   MEMBERSC_IN_AG(X3) -> U3_AG(X3, membercD_in_ag(X3))
   U3_AG(X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X3)

The TRS R consists of the following rules:

   membercD_in_ag(.(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(.(X2, X3)) -> U18_ag(X2, X3, membercD_in_ag(X3))
   U18_ag(X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))

The set Q consists of the following terms:

   membercD_in_ag(x0)
   U18_ag(x0, x1, x2)

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

(91) TransformationProof (SOUND)
By narrowing [LPAR04] the rule MEMBERSC_IN_AG(X3) -> U3_AG(X3, membercD_in_ag(X3)) at position [1] we obtained the following new rules [LPAR04]:

   (MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), membercD_out_ag(x0, .(x0, x1))),MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), membercD_out_ag(x0, .(x0, x1))))
   (MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), U18_ag(x0, x1, membercD_in_ag(x1))),MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), U18_ag(x0, x1, membercD_in_ag(x1))))


----------------------------------------

(92)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   U3_AG(X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X3)
   MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), membercD_out_ag(x0, .(x0, x1)))
   MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), U18_ag(x0, x1, membercD_in_ag(x1)))

The TRS R consists of the following rules:

   membercD_in_ag(.(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(.(X2, X3)) -> U18_ag(X2, X3, membercD_in_ag(X3))
   U18_ag(X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))

The set Q consists of the following terms:

   membercD_in_ag(x0)
   U18_ag(x0, x1, x2)

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

(93) TransformationProof (EQUIVALENT)
By instantiating [LPAR04] the rule U3_AG(X3, membercD_out_ag(X1, X3)) -> MEMBERSC_IN_AG(X3) we obtained the following new rules [LPAR04]:

   (U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1)),U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1)))
   (U3_AG(.(z0, z1), membercD_out_ag(x1, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1)),U3_AG(.(z0, z1), membercD_out_ag(x1, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1)))


----------------------------------------

(94)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), membercD_out_ag(x0, .(x0, x1)))
   MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), U18_ag(x0, x1, membercD_in_ag(x1)))
   U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1))
   U3_AG(.(z0, z1), membercD_out_ag(x1, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1))

The TRS R consists of the following rules:

   membercD_in_ag(.(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(.(X2, X3)) -> U18_ag(X2, X3, membercD_in_ag(X3))
   U18_ag(X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))

The set Q consists of the following terms:

   membercD_in_ag(x0)
   U18_ag(x0, x1, x2)

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

(95) NonTerminationLoopProof (COMPLETE)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1))) evaluates to  t =U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1)))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
* Matcher: [ ]
* Semiunifier: [ ]

--------------------------------------------------------------------------------
Rewriting sequence

U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1))) -> MEMBERSC_IN_AG(.(z0, z1))
with rule U3_AG(.(z0', z1'), membercD_out_ag(z0', .(z0', z1'))) -> MEMBERSC_IN_AG(.(z0', z1')) at position [] and matcher [z0' / z0, z1' / z1]

MEMBERSC_IN_AG(.(z0, z1)) -> U3_AG(.(z0, z1), membercD_out_ag(z0, .(z0, z1)))
with rule MEMBERSC_IN_AG(.(x0, x1)) -> U3_AG(.(x0, x1), membercD_out_ag(x0, .(x0, x1)))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




----------------------------------------

(96)
NO

----------------------------------------

(97)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   SELECTA_IN_AGA(X1, .(X2, X3), .(X2, X4)) -> SELECTA_IN_AGA(X1, X3, X4)

The TRS R consists of the following rules:

   selectcA_in_aga(X1, .(X1, X2), X2) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(X1, .(X2, X3), .(X2, X4)) -> U12_aga(X1, X2, X3, X4, selectcA_in_aga(X1, X3, X4))
   U12_aga(X1, X2, X3, X4, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(.(X1, X2), X3) -> U16_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U16_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X2, X3, memberscC_in_ag(X2, X3))
   memberscC_in_ag([], X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X2, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

selectcA_in_aga(x1, x2, x3)  =  selectcA_in_aga(x2)

selectcA_out_aga(x1, x2, x3)  =  selectcA_out_aga(x1, x2, x3)

U12_aga(x1, x2, x3, x4, x5)  =  U12_aga(x2, x3, x5)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

memberscC_in_ag(x1, x2)  =  memberscC_in_ag(x2)

U16_ag(x1, x2, x3, x4)  =  U16_ag(x3, x4)

U17_ag(x1, x2, x3, x4)  =  U17_ag(x1, x3, x4)

memberscC_out_ag(x1, x2)  =  memberscC_out_ag(x1, x2)

SELECTA_IN_AGA(x1, x2, x3)  =  SELECTA_IN_AGA(x2)


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

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

(99)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   SELECTA_IN_AGA(X1, .(X2, X3), .(X2, X4)) -> SELECTA_IN_AGA(X1, X3, X4)

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

SELECTA_IN_AGA(x1, x2, x3)  =  SELECTA_IN_AGA(x2)


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

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

(101)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   SELECTA_IN_AGA(.(X2, X3)) -> SELECTA_IN_AGA(X3)

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

(102) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*SELECTA_IN_AGA(.(X2, X3)) -> SELECTA_IN_AGA(X3)
The graph contains the following edges 1 > 1


----------------------------------------

(103)
YES

----------------------------------------

(104)
Obligation:
Pi DP problem:
The TRS P consists of the following rules:

   COLOR_MAPB_IN_AG(l(region(X1, X2, X3), X4), X5) -> U7_AG(X1, X2, X3, X4, X5, selectcA_in_aga(X2, X5, X6))
   U7_AG(X1, X2, X3, X4, X5, selectcA_out_aga(X2, X5, X6)) -> U9_AG(X1, X2, X3, X4, X5, memberscC_in_ag(X3, X6))
   U9_AG(X1, X2, X3, X4, X5, memberscC_out_ag(X3, X6)) -> COLOR_MAPB_IN_AG(X4, X5)

The TRS R consists of the following rules:

   selectcA_in_aga(X1, .(X1, X2), X2) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(X1, .(X2, X3), .(X2, X4)) -> U12_aga(X1, X2, X3, X4, selectcA_in_aga(X1, X3, X4))
   U12_aga(X1, X2, X3, X4, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(X1, .(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(X1, .(X2, X3)) -> U18_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U18_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(.(X1, X2), X3) -> U16_ag(X1, X2, X3, membercD_in_ag(X1, X3))
   U16_ag(X1, X2, X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X2, X3, memberscC_in_ag(X2, X3))
   memberscC_in_ag([], X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X2, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)

region(x1, x2, x3)  =  region(x2, x3)

selectcA_in_aga(x1, x2, x3)  =  selectcA_in_aga(x2)

selectcA_out_aga(x1, x2, x3)  =  selectcA_out_aga(x1, x2, x3)

U12_aga(x1, x2, x3, x4, x5)  =  U12_aga(x2, x3, x5)

membercD_in_ag(x1, x2)  =  membercD_in_ag(x2)

membercD_out_ag(x1, x2)  =  membercD_out_ag(x1, x2)

U18_ag(x1, x2, x3, x4)  =  U18_ag(x2, x3, x4)

memberscC_in_ag(x1, x2)  =  memberscC_in_ag(x2)

U16_ag(x1, x2, x3, x4)  =  U16_ag(x3, x4)

U17_ag(x1, x2, x3, x4)  =  U17_ag(x1, x3, x4)

memberscC_out_ag(x1, x2)  =  memberscC_out_ag(x1, x2)

COLOR_MAPB_IN_AG(x1, x2)  =  COLOR_MAPB_IN_AG(x2)

U7_AG(x1, x2, x3, x4, x5, x6)  =  U7_AG(x5, x6)

U9_AG(x1, x2, x3, x4, x5, x6)  =  U9_AG(x5, x6)


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

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

(106)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   COLOR_MAPB_IN_AG(X5) -> U7_AG(X5, selectcA_in_aga(X5))
   U7_AG(X5, selectcA_out_aga(X2, X5, X6)) -> U9_AG(X5, memberscC_in_ag(X6))
   U9_AG(X5, memberscC_out_ag(X3, X6)) -> COLOR_MAPB_IN_AG(X5)

The TRS R consists of the following rules:

   selectcA_in_aga(.(X1, X2)) -> selectcA_out_aga(X1, .(X1, X2), X2)
   selectcA_in_aga(.(X2, X3)) -> U12_aga(X2, X3, selectcA_in_aga(X3))
   U12_aga(X2, X3, selectcA_out_aga(X1, X3, X4)) -> selectcA_out_aga(X1, .(X2, X3), .(X2, X4))
   membercD_in_ag(.(X1, X2)) -> membercD_out_ag(X1, .(X1, X2))
   membercD_in_ag(.(X2, X3)) -> U18_ag(X2, X3, membercD_in_ag(X3))
   U18_ag(X2, X3, membercD_out_ag(X1, X3)) -> membercD_out_ag(X1, .(X2, X3))
   memberscC_in_ag(X3) -> U16_ag(X3, membercD_in_ag(X3))
   U16_ag(X3, membercD_out_ag(X1, X3)) -> U17_ag(X1, X3, memberscC_in_ag(X3))
   memberscC_in_ag(X1) -> memberscC_out_ag([], X1)
   U17_ag(X1, X3, memberscC_out_ag(X2, X3)) -> memberscC_out_ag(.(X1, X2), X3)

The set Q consists of the following terms:

   selectcA_in_aga(x0)
   U12_aga(x0, x1, x2)
   membercD_in_ag(x0)
   U18_ag(x0, x1, x2)
   memberscC_in_ag(x0)
   U16_ag(x0, x1)
   U17_ag(x0, x1, x2)

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

(107) PrologToTRSTransformerProof (SOUND)
Transformed Prolog program to TRS.

{
    "root": 1,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(color_map (l Region Regions) Colors)",
                "(',' (color_region Region Colors) (color_map Regions Colors))"
            ],
            [
                "(color_map (nil) Colors)",
                null
            ],
            [
                "(color_region (region Name Color Neighbors) Colors)",
                "(',' (select Color Colors Colors1) (members Neighbors Colors1))"
            ],
            [
                "(select X (. X Xs) Xs)",
                null
            ],
            [
                "(select X (. Y Ys) (. Y Zs))",
                "(select X Ys Zs)"
            ],
            [
                "(members (. X Xs) Ys)",
                "(',' (member X Ys) (members Xs Ys))"
            ],
            [
                "(members ([]) Ys)",
                null
            ],
            [
                "(member X (. X X1))",
                null
            ],
            [
                "(member X (. X2 T))",
                "(member X T)"
            ],
            [
                "(test_color Name Map)",
                "(',' (map Name Map) (',' (colors Name Colors) (color_map Map Colors)))"
            ],
            [
                "(map (test) (l (region (a) A (. B (. C (. D ([]))))) (l (region (b) B (. A (. C (. E ([]))))) (l (region (c) C (. A (. B (. D (. E (. F ([]))))))) (l (region (d) D (. A (. C (. F ([]))))) (l (region (e) E (. B (. C (. F ([]))))) (l (region (f) F (. C (. D (. E ([]))))) (nil))))))))",
                null
            ],
            [
                "(colors X (. (red) (. (yellow) (. (blue) (. (white) ([]))))))",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "type": "Nodes",
            "590": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(members T101 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "591": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 5,
                        "term": "(member T95 T94)"
                    },
                    {
                        "clause": 8,
                        "scope": 5,
                        "term": "(member T95 T94)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "592": {
                "goal": [{
                    "clause": 7,
                    "scope": 5,
                    "term": "(member T95 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "571": {
                "goal": [{
                    "clause": 6,
                    "scope": 4,
                    "term": "(members T48 T47)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "593": {
                "goal": [{
                    "clause": 8,
                    "scope": 5,
                    "term": "(member T95 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "550": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_map T24 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "594": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "595": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "596": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "631": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "555": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(color_region T18 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "632": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "556": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (select T41 T40 X41) (members T42 X41))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "633": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "557": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "558": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(select T41 T40 X41)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "613": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(member T125 T124)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T124"],
                    "free": [],
                    "exprvars": []
                }
            },
            "559": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(members T48 T47)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "614": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "616": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "617": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "618": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "11": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (color_region T18 T17) (color_map T19 T17))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "12": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "560": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 3,
                        "term": "(select T41 T40 X41)"
                    },
                    {
                        "clause": 4,
                        "scope": 3,
                        "term": "(select T41 T40 X41)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "561": {
                "goal": [{
                    "clause": 3,
                    "scope": 3,
                    "term": "(select T41 T40 X41)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "1": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "562": {
                "goal": [{
                    "clause": 4,
                    "scope": 3,
                    "term": "(select T41 T40 X41)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "563": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "564": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "4": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(color_map T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(color_map T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "565": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "587": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (member T95 T94) (members T96 T94))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "566": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(select T72 T71 X74)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T71"],
                    "free": ["X74"],
                    "exprvars": []
                }
            },
            "588": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "567": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "589": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(member T95 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "7": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "568": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 4,
                        "term": "(members T48 T47)"
                    },
                    {
                        "clause": 6,
                        "scope": 4,
                        "term": "(members T48 T47)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "8": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "569": {
                "goal": [{
                    "clause": 5,
                    "scope": 4,
                    "term": "(members T48 T47)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "549": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_region T18 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 1,
                "to": 4,
                "label": "CASE"
            },
            {
                "from": 4,
                "to": 7,
                "label": "PARALLEL"
            },
            {
                "from": 4,
                "to": 8,
                "label": "PARALLEL"
            },
            {
                "from": 7,
                "to": 11,
                "label": "EVAL with clause\ncolor_map(l(X15, X16), X17) :- ','(color_region(X15, X17), color_map(X16, X17)).\nand substitutionX15 -> T18,\nX16 -> T19,\nT1 -> l(T18, T19),\nT2 -> T17,\nX17 -> T17,\nT15 -> T18,\nT16 -> T19"
            },
            {
                "from": 7,
                "to": 12,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 8,
                "to": 631,
                "label": "EVAL with clause\ncolor_map(nil, X139).\nand substitutionT1 -> nil,\nT2 -> T141,\nX139 -> T141"
            },
            {
                "from": 8,
                "to": 632,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 11,
                "to": 549,
                "label": "SPLIT 1"
            },
            {
                "from": 11,
                "to": 550,
                "label": "SPLIT 2\nnew knowledge:\nT17 is ground\nreplacements:T19 -> T24"
            },
            {
                "from": 549,
                "to": 555,
                "label": "CASE"
            },
            {
                "from": 550,
                "to": 1,
                "label": "INSTANCE with matching:\nT1 -> T24\nT2 -> T17"
            },
            {
                "from": 555,
                "to": 556,
                "label": "EVAL with clause\ncolor_region(region(X37, X38, X39), X40) :- ','(select(X38, X40, X41), members(X39, X41)).\nand substitutionX37 -> T37,\nX38 -> T41,\nX39 -> T42,\nT18 -> region(T37, T41, T42),\nT17 -> T40,\nX40 -> T40,\nT38 -> T41,\nT39 -> T42"
            },
            {
                "from": 555,
                "to": 557,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 556,
                "to": 558,
                "label": "SPLIT 1"
            },
            {
                "from": 556,
                "to": 559,
                "label": "SPLIT 2\nnew knowledge:\nT41 is ground\nT40 is ground\nT47 is ground\nreplacements:X41 -> T47,\nT42 -> T48"
            },
            {
                "from": 558,
                "to": 560,
                "label": "CASE"
            },
            {
                "from": 559,
                "to": 568,
                "label": "CASE"
            },
            {
                "from": 560,
                "to": 561,
                "label": "PARALLEL"
            },
            {
                "from": 560,
                "to": 562,
                "label": "PARALLEL"
            },
            {
                "from": 561,
                "to": 563,
                "label": "EVAL with clause\nselect(X58, .(X58, X59), X59).\nand substitutionT41 -> T61,\nX58 -> T61,\nX59 -> T62,\nT40 -> .(T61, T62),\nX41 -> T62"
            },
            {
                "from": 561,
                "to": 564,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 562,
                "to": 566,
                "label": "EVAL with clause\nselect(X70, .(X71, X72), .(X71, X73)) :- select(X70, X72, X73).\nand substitutionT41 -> T72,\nX70 -> T72,\nX71 -> T70,\nX72 -> T71,\nT40 -> .(T70, T71),\nX73 -> X74,\nX41 -> .(T70, X74),\nT69 -> T72"
            },
            {
                "from": 562,
                "to": 567,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 563,
                "to": 565,
                "label": "SUCCESS"
            },
            {
                "from": 566,
                "to": 558,
                "label": "INSTANCE with matching:\nT41 -> T72\nT40 -> T71\nX41 -> X74"
            },
            {
                "from": 568,
                "to": 569,
                "label": "PARALLEL"
            },
            {
                "from": 568,
                "to": 571,
                "label": "PARALLEL"
            },
            {
                "from": 569,
                "to": 587,
                "label": "EVAL with clause\nmembers(.(X94, X95), X96) :- ','(member(X94, X96), members(X95, X96)).\nand substitutionX94 -> T95,\nX95 -> T96,\nT48 -> .(T95, T96),\nT47 -> T94,\nX96 -> T94,\nT92 -> T95,\nT93 -> T96"
            },
            {
                "from": 569,
                "to": 588,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 571,
                "to": 616,
                "label": "EVAL with clause\nmembers([], X133).\nand substitutionT48 -> [],\nT47 -> T135,\nX133 -> T135"
            },
            {
                "from": 571,
                "to": 617,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 587,
                "to": 589,
                "label": "SPLIT 1"
            },
            {
                "from": 587,
                "to": 590,
                "label": "SPLIT 2\nnew knowledge:\nT95 is ground\nT94 is ground\nreplacements:T96 -> T101"
            },
            {
                "from": 589,
                "to": 591,
                "label": "CASE"
            },
            {
                "from": 590,
                "to": 559,
                "label": "INSTANCE with matching:\nT48 -> T101\nT47 -> T94"
            },
            {
                "from": 591,
                "to": 592,
                "label": "PARALLEL"
            },
            {
                "from": 591,
                "to": 593,
                "label": "PARALLEL"
            },
            {
                "from": 592,
                "to": 594,
                "label": "EVAL with clause\nmember(X113, .(X113, X114)).\nand substitutionT95 -> T114,\nX113 -> T114,\nX114 -> T115,\nT94 -> .(T114, T115)"
            },
            {
                "from": 592,
                "to": 595,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 593,
                "to": 613,
                "label": "EVAL with clause\nmember(X121, .(X122, X123)) :- member(X121, X123).\nand substitutionT95 -> T125,\nX121 -> T125,\nX122 -> T123,\nX123 -> T124,\nT94 -> .(T123, T124),\nT122 -> T125"
            },
            {
                "from": 593,
                "to": 614,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 594,
                "to": 596,
                "label": "SUCCESS"
            },
            {
                "from": 613,
                "to": 589,
                "label": "INSTANCE with matching:\nT95 -> T125\nT94 -> T124"
            },
            {
                "from": 616,
                "to": 618,
                "label": "SUCCESS"
            },
            {
                "from": 631,
                "to": 633,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(108)
Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:

   f1_in(T17) -> U1(f11_in(T17), T17)
   U1(f11_out1, T17) -> f1_out1
   f1_in(T141) -> f1_out1
   f558_in(.(T61, T62)) -> f558_out1(T61, T62)
   f558_in(.(T70, T71)) -> U2(f558_in(T71), .(T70, T71))
   U2(f558_out1(T72, X74), .(T70, T71)) -> f558_out1(T72, .(T70, X74))
   f559_in(T94) -> U3(f587_in(T94), T94)
   U3(f587_out1(T95, T96), T94) -> f559_out1(.(T95, T96))
   f559_in(T135) -> f559_out1([])
   f589_in(.(T114, T115)) -> f589_out1(T114)
   f589_in(.(T123, T124)) -> U4(f589_in(T124), .(T123, T124))
   U4(f589_out1(T125), .(T123, T124)) -> f589_out1(T125)
   f549_in(T40) -> U5(f556_in(T40), T40)
   U5(f556_out1(T41, X41, T42), T40) -> f549_out1
   f11_in(T17) -> U6(f549_in(T17), T17)
   U6(f549_out1, T17) -> U7(f1_in(T17), T17)
   U7(f1_out1, T17) -> f11_out1
   f556_in(T40) -> U8(f558_in(T40), T40)
   U8(f558_out1(T41, T47), T40) -> U9(f559_in(T47), T40, T41, T47)
   U9(f559_out1(T48), T40, T41, T47) -> f556_out1(T41, T47, T48)
   f587_in(T94) -> U10(f589_in(T94), T94)
   U10(f589_out1(T95), T94) -> U11(f559_in(T94), T94, T95)
   U11(f559_out1(T101), T94, T95) -> f587_out1(T95, T101)

Q is empty.

----------------------------------------

(109) DependencyPairsProof (EQUIVALENT)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
----------------------------------------

(110)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F1_IN(T17) -> U1^1(f11_in(T17), T17)
   F1_IN(T17) -> F11_IN(T17)
   F558_IN(.(T70, T71)) -> U2^1(f558_in(T71), .(T70, T71))
   F558_IN(.(T70, T71)) -> F558_IN(T71)
   F559_IN(T94) -> U3^1(f587_in(T94), T94)
   F559_IN(T94) -> F587_IN(T94)
   F589_IN(.(T123, T124)) -> U4^1(f589_in(T124), .(T123, T124))
   F589_IN(.(T123, T124)) -> F589_IN(T124)
   F549_IN(T40) -> U5^1(f556_in(T40), T40)
   F549_IN(T40) -> F556_IN(T40)
   F11_IN(T17) -> U6^1(f549_in(T17), T17)
   F11_IN(T17) -> F549_IN(T17)
   U6^1(f549_out1, T17) -> U7^1(f1_in(T17), T17)
   U6^1(f549_out1, T17) -> F1_IN(T17)
   F556_IN(T40) -> U8^1(f558_in(T40), T40)
   F556_IN(T40) -> F558_IN(T40)
   U8^1(f558_out1(T41, T47), T40) -> U9^1(f559_in(T47), T40, T41, T47)
   U8^1(f558_out1(T41, T47), T40) -> F559_IN(T47)
   F587_IN(T94) -> U10^1(f589_in(T94), T94)
   F587_IN(T94) -> F589_IN(T94)
   U10^1(f589_out1(T95), T94) -> U11^1(f559_in(T94), T94, T95)
   U10^1(f589_out1(T95), T94) -> F559_IN(T94)

The TRS R consists of the following rules:

   f1_in(T17) -> U1(f11_in(T17), T17)
   U1(f11_out1, T17) -> f1_out1
   f1_in(T141) -> f1_out1
   f558_in(.(T61, T62)) -> f558_out1(T61, T62)
   f558_in(.(T70, T71)) -> U2(f558_in(T71), .(T70, T71))
   U2(f558_out1(T72, X74), .(T70, T71)) -> f558_out1(T72, .(T70, X74))
   f559_in(T94) -> U3(f587_in(T94), T94)
   U3(f587_out1(T95, T96), T94) -> f559_out1(.(T95, T96))
   f559_in(T135) -> f559_out1([])
   f589_in(.(T114, T115)) -> f589_out1(T114)
   f589_in(.(T123, T124)) -> U4(f589_in(T124), .(T123, T124))
   U4(f589_out1(T125), .(T123, T124)) -> f589_out1(T125)
   f549_in(T40) -> U5(f556_in(T40), T40)
   U5(f556_out1(T41, X41, T42), T40) -> f549_out1
   f11_in(T17) -> U6(f549_in(T17), T17)
   U6(f549_out1, T17) -> U7(f1_in(T17), T17)
   U7(f1_out1, T17) -> f11_out1
   f556_in(T40) -> U8(f558_in(T40), T40)
   U8(f558_out1(T41, T47), T40) -> U9(f559_in(T47), T40, T41, T47)
   U9(f559_out1(T48), T40, T41, T47) -> f556_out1(T41, T47, T48)
   f587_in(T94) -> U10(f589_in(T94), T94)
   U10(f589_out1(T95), T94) -> U11(f559_in(T94), T94, T95)
   U11(f559_out1(T101), T94, T95) -> f587_out1(T95, T101)

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

(111) DependencyGraphProof (EQUIVALENT)
The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 4 SCCs with 14 less nodes.
----------------------------------------

(112)
Complex Obligation (AND)

----------------------------------------

(113)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F589_IN(.(T123, T124)) -> F589_IN(T124)

The TRS R consists of the following rules:

   f1_in(T17) -> U1(f11_in(T17), T17)
   U1(f11_out1, T17) -> f1_out1
   f1_in(T141) -> f1_out1
   f558_in(.(T61, T62)) -> f558_out1(T61, T62)
   f558_in(.(T70, T71)) -> U2(f558_in(T71), .(T70, T71))
   U2(f558_out1(T72, X74), .(T70, T71)) -> f558_out1(T72, .(T70, X74))
   f559_in(T94) -> U3(f587_in(T94), T94)
   U3(f587_out1(T95, T96), T94) -> f559_out1(.(T95, T96))
   f559_in(T135) -> f559_out1([])
   f589_in(.(T114, T115)) -> f589_out1(T114)
   f589_in(.(T123, T124)) -> U4(f589_in(T124), .(T123, T124))
   U4(f589_out1(T125), .(T123, T124)) -> f589_out1(T125)
   f549_in(T40) -> U5(f556_in(T40), T40)
   U5(f556_out1(T41, X41, T42), T40) -> f549_out1
   f11_in(T17) -> U6(f549_in(T17), T17)
   U6(f549_out1, T17) -> U7(f1_in(T17), T17)
   U7(f1_out1, T17) -> f11_out1
   f556_in(T40) -> U8(f558_in(T40), T40)
   U8(f558_out1(T41, T47), T40) -> U9(f559_in(T47), T40, T41, T47)
   U9(f559_out1(T48), T40, T41, T47) -> f556_out1(T41, T47, T48)
   f587_in(T94) -> U10(f589_in(T94), T94)
   U10(f589_out1(T95), T94) -> U11(f559_in(T94), T94, T95)
   U11(f559_out1(T101), T94, T95) -> f587_out1(T95, T101)

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

(114) UsableRulesProof (EQUIVALENT)
We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.
----------------------------------------

(115)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F589_IN(.(T123, T124)) -> F589_IN(T124)

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

(116) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*F589_IN(.(T123, T124)) -> F589_IN(T124)
The graph contains the following edges 1 > 1


----------------------------------------

(117)
YES

----------------------------------------

(118)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F559_IN(T94) -> F587_IN(T94)
   F587_IN(T94) -> U10^1(f589_in(T94), T94)
   U10^1(f589_out1(T95), T94) -> F559_IN(T94)

The TRS R consists of the following rules:

   f1_in(T17) -> U1(f11_in(T17), T17)
   U1(f11_out1, T17) -> f1_out1
   f1_in(T141) -> f1_out1
   f558_in(.(T61, T62)) -> f558_out1(T61, T62)
   f558_in(.(T70, T71)) -> U2(f558_in(T71), .(T70, T71))
   U2(f558_out1(T72, X74), .(T70, T71)) -> f558_out1(T72, .(T70, X74))
   f559_in(T94) -> U3(f587_in(T94), T94)
   U3(f587_out1(T95, T96), T94) -> f559_out1(.(T95, T96))
   f559_in(T135) -> f559_out1([])
   f589_in(.(T114, T115)) -> f589_out1(T114)
   f589_in(.(T123, T124)) -> U4(f589_in(T124), .(T123, T124))
   U4(f589_out1(T125), .(T123, T124)) -> f589_out1(T125)
   f549_in(T40) -> U5(f556_in(T40), T40)
   U5(f556_out1(T41, X41, T42), T40) -> f549_out1
   f11_in(T17) -> U6(f549_in(T17), T17)
   U6(f549_out1, T17) -> U7(f1_in(T17), T17)
   U7(f1_out1, T17) -> f11_out1
   f556_in(T40) -> U8(f558_in(T40), T40)
   U8(f558_out1(T41, T47), T40) -> U9(f559_in(T47), T40, T41, T47)
   U9(f559_out1(T48), T40, T41, T47) -> f556_out1(T41, T47, T48)
   f587_in(T94) -> U10(f589_in(T94), T94)
   U10(f589_out1(T95), T94) -> U11(f559_in(T94), T94, T95)
   U11(f559_out1(T101), T94, T95) -> f587_out1(T95, T101)

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

(119) NonTerminationLoopProof (COMPLETE)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = F587_IN(.(T114, T115)) evaluates to  t =F587_IN(.(T114, T115))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
* Matcher: [ ]
* Semiunifier: [ ]

--------------------------------------------------------------------------------
Rewriting sequence

F587_IN(.(T114, T115)) -> U10^1(f589_in(.(T114, T115)), .(T114, T115))
with rule F587_IN(T94) -> U10^1(f589_in(T94), T94) at position [] and matcher [T94 / .(T114, T115)]

U10^1(f589_in(.(T114, T115)), .(T114, T115)) -> U10^1(f589_out1(T114), .(T114, T115))
with rule f589_in(.(T114', T115')) -> f589_out1(T114') at position [0] and matcher [T114' / T114, T115' / T115]

U10^1(f589_out1(T114), .(T114, T115)) -> F559_IN(.(T114, T115))
with rule U10^1(f589_out1(T95), T94') -> F559_IN(T94') at position [] and matcher [T95 / T114, T94' / .(T114, T115)]

F559_IN(.(T114, T115)) -> F587_IN(.(T114, T115))
with rule F559_IN(T94) -> F587_IN(T94)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




----------------------------------------

(120)
NO

----------------------------------------

(121)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F558_IN(.(T70, T71)) -> F558_IN(T71)

The TRS R consists of the following rules:

   f1_in(T17) -> U1(f11_in(T17), T17)
   U1(f11_out1, T17) -> f1_out1
   f1_in(T141) -> f1_out1
   f558_in(.(T61, T62)) -> f558_out1(T61, T62)
   f558_in(.(T70, T71)) -> U2(f558_in(T71), .(T70, T71))
   U2(f558_out1(T72, X74), .(T70, T71)) -> f558_out1(T72, .(T70, X74))
   f559_in(T94) -> U3(f587_in(T94), T94)
   U3(f587_out1(T95, T96), T94) -> f559_out1(.(T95, T96))
   f559_in(T135) -> f559_out1([])
   f589_in(.(T114, T115)) -> f589_out1(T114)
   f589_in(.(T123, T124)) -> U4(f589_in(T124), .(T123, T124))
   U4(f589_out1(T125), .(T123, T124)) -> f589_out1(T125)
   f549_in(T40) -> U5(f556_in(T40), T40)
   U5(f556_out1(T41, X41, T42), T40) -> f549_out1
   f11_in(T17) -> U6(f549_in(T17), T17)
   U6(f549_out1, T17) -> U7(f1_in(T17), T17)
   U7(f1_out1, T17) -> f11_out1
   f556_in(T40) -> U8(f558_in(T40), T40)
   U8(f558_out1(T41, T47), T40) -> U9(f559_in(T47), T40, T41, T47)
   U9(f559_out1(T48), T40, T41, T47) -> f556_out1(T41, T47, T48)
   f587_in(T94) -> U10(f589_in(T94), T94)
   U10(f589_out1(T95), T94) -> U11(f559_in(T94), T94, T95)
   U11(f559_out1(T101), T94, T95) -> f587_out1(T95, T101)

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

(122) UsableRulesProof (EQUIVALENT)
We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.
----------------------------------------

(123)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F558_IN(.(T70, T71)) -> F558_IN(T71)

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

(124) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*F558_IN(.(T70, T71)) -> F558_IN(T71)
The graph contains the following edges 1 > 1


----------------------------------------

(125)
YES

----------------------------------------

(126)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   F1_IN(T17) -> F11_IN(T17)
   F11_IN(T17) -> U6^1(f549_in(T17), T17)
   U6^1(f549_out1, T17) -> F1_IN(T17)

The TRS R consists of the following rules:

   f1_in(T17) -> U1(f11_in(T17), T17)
   U1(f11_out1, T17) -> f1_out1
   f1_in(T141) -> f1_out1
   f558_in(.(T61, T62)) -> f558_out1(T61, T62)
   f558_in(.(T70, T71)) -> U2(f558_in(T71), .(T70, T71))
   U2(f558_out1(T72, X74), .(T70, T71)) -> f558_out1(T72, .(T70, X74))
   f559_in(T94) -> U3(f587_in(T94), T94)
   U3(f587_out1(T95, T96), T94) -> f559_out1(.(T95, T96))
   f559_in(T135) -> f559_out1([])
   f589_in(.(T114, T115)) -> f589_out1(T114)
   f589_in(.(T123, T124)) -> U4(f589_in(T124), .(T123, T124))
   U4(f589_out1(T125), .(T123, T124)) -> f589_out1(T125)
   f549_in(T40) -> U5(f556_in(T40), T40)
   U5(f556_out1(T41, X41, T42), T40) -> f549_out1
   f11_in(T17) -> U6(f549_in(T17), T17)
   U6(f549_out1, T17) -> U7(f1_in(T17), T17)
   U7(f1_out1, T17) -> f11_out1
   f556_in(T40) -> U8(f558_in(T40), T40)
   U8(f558_out1(T41, T47), T40) -> U9(f559_in(T47), T40, T41, T47)
   U9(f559_out1(T48), T40, T41, T47) -> f556_out1(T41, T47, T48)
   f587_in(T94) -> U10(f589_in(T94), T94)
   U10(f589_out1(T95), T94) -> U11(f559_in(T94), T94, T95)
   U11(f559_out1(T101), T94, T95) -> f587_out1(T95, T101)

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

(127) NonTerminationLoopProof (COMPLETE)
We used the non-termination processor [FROCOS05] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

s = F11_IN(.(T61, T62)) evaluates to  t =F11_IN(.(T61, T62))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:
* Matcher: [ ]
* Semiunifier: [ ]

--------------------------------------------------------------------------------
Rewriting sequence

F11_IN(.(T61, T62)) -> U6^1(f549_in(.(T61, T62)), .(T61, T62))
with rule F11_IN(T17) -> U6^1(f549_in(T17), T17) at position [] and matcher [T17 / .(T61, T62)]

U6^1(f549_in(.(T61, T62)), .(T61, T62)) -> U6^1(U5(f556_in(.(T61, T62)), .(T61, T62)), .(T61, T62))
with rule f549_in(T40') -> U5(f556_in(T40'), T40') at position [0] and matcher [T40' / .(T61, T62)]

U6^1(U5(f556_in(.(T61, T62)), .(T61, T62)), .(T61, T62)) -> U6^1(U5(U8(f558_in(.(T61, T62)), .(T61, T62)), .(T61, T62)), .(T61, T62))
with rule f556_in(T40') -> U8(f558_in(T40'), T40') at position [0,0] and matcher [T40' / .(T61, T62)]

U6^1(U5(U8(f558_in(.(T61, T62)), .(T61, T62)), .(T61, T62)), .(T61, T62)) -> U6^1(U5(U8(f558_out1(T61, T62), .(T61, T62)), .(T61, T62)), .(T61, T62))
with rule f558_in(.(T61', T62')) -> f558_out1(T61', T62') at position [0,0,0] and matcher [T61' / T61, T62' / T62]

U6^1(U5(U8(f558_out1(T61, T62), .(T61, T62)), .(T61, T62)), .(T61, T62)) -> U6^1(U5(U9(f559_in(T62), .(T61, T62), T61, T62), .(T61, T62)), .(T61, T62))
with rule U8(f558_out1(T41, T47'), T40'') -> U9(f559_in(T47'), T40'', T41, T47') at position [0,0] and matcher [T41 / T61, T47' / T62, T40'' / .(T61, T62)]

U6^1(U5(U9(f559_in(T62), .(T61, T62), T61, T62), .(T61, T62)), .(T61, T62)) -> U6^1(U5(U9(f559_out1([]), .(T61, T62), T61, T62), .(T61, T62)), .(T61, T62))
with rule f559_in(T135) -> f559_out1([]) at position [0,0,0] and matcher [T135 / T62]

U6^1(U5(U9(f559_out1([]), .(T61, T62), T61, T62), .(T61, T62)), .(T61, T62)) -> U6^1(U5(f556_out1(T61, T62, []), .(T61, T62)), .(T61, T62))
with rule U9(f559_out1(T48), T40', T41', T47) -> f556_out1(T41', T47, T48) at position [0,0] and matcher [T48 / [], T40' / .(T61, T62), T41' / T61, T47 / T62]

U6^1(U5(f556_out1(T61, T62, []), .(T61, T62)), .(T61, T62)) -> U6^1(f549_out1, .(T61, T62))
with rule U5(f556_out1(T41, X41, T42), T40) -> f549_out1 at position [0] and matcher [T41 / T61, X41 / T62, T42 / [], T40 / .(T61, T62)]

U6^1(f549_out1, .(T61, T62)) -> F1_IN(.(T61, T62))
with rule U6^1(f549_out1, T17') -> F1_IN(T17') at position [] and matcher [T17' / .(T61, T62)]

F1_IN(.(T61, T62)) -> F11_IN(.(T61, T62))
with rule F1_IN(T17) -> F11_IN(T17)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




----------------------------------------

(128)
NO

----------------------------------------

(129) PrologToIRSwTTransformerProof (SOUND)
Transformed Prolog program to IRSwT according to method in Master Thesis of A. Weinert

{
    "root": 2,
    "program": {
        "directives": [],
        "clauses": [
            [
                "(color_map (l Region Regions) Colors)",
                "(',' (color_region Region Colors) (color_map Regions Colors))"
            ],
            [
                "(color_map (nil) Colors)",
                null
            ],
            [
                "(color_region (region Name Color Neighbors) Colors)",
                "(',' (select Color Colors Colors1) (members Neighbors Colors1))"
            ],
            [
                "(select X (. X Xs) Xs)",
                null
            ],
            [
                "(select X (. Y Ys) (. Y Zs))",
                "(select X Ys Zs)"
            ],
            [
                "(members (. X Xs) Ys)",
                "(',' (member X Ys) (members Xs Ys))"
            ],
            [
                "(members ([]) Ys)",
                null
            ],
            [
                "(member X (. X X1))",
                null
            ],
            [
                "(member X (. X2 T))",
                "(member X T)"
            ],
            [
                "(test_color Name Map)",
                "(',' (map Name Map) (',' (colors Name Colors) (color_map Map Colors)))"
            ],
            [
                "(map (test) (l (region (a) A (. B (. C (. D ([]))))) (l (region (b) B (. A (. C (. E ([]))))) (l (region (c) C (. A (. B (. D (. E (. F ([]))))))) (l (region (d) D (. A (. C (. F ([]))))) (l (region (e) E (. B (. C (. F ([]))))) (l (region (f) F (. C (. D (. E ([]))))) (nil))))))))",
                null
            ],
            [
                "(colors X (. (red) (. (yellow) (. (blue) (. (white) ([]))))))",
                null
            ]
        ]
    },
    "graph": {
        "nodes": {
            "24": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_region T18 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "68": {
                "goal": [
                    {
                        "clause": 3,
                        "scope": 3,
                        "term": "(select T41 T40 X41)"
                    },
                    {
                        "clause": 4,
                        "scope": 3,
                        "term": "(select T41 T40 X41)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "25": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_map T24 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "type": "Nodes",
            "551": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "134": {
                "goal": [{
                    "clause": 3,
                    "scope": 3,
                    "term": "(select T41 T40 X41)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "552": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "553": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(member T125 T124)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T124"],
                    "free": [],
                    "exprvars": []
                }
            },
            "630": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "499": {
                "goal": [{
                    "clause": 5,
                    "scope": 4,
                    "term": "(members T48 T47)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "554": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "259": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "139": {
                "goal": [{
                    "clause": 4,
                    "scope": 3,
                    "term": "(select T41 T40 X41)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "50": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "10": {
                "goal": [{
                    "clause": 1,
                    "scope": 1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "34": {
                "goal": [{
                    "clause": 2,
                    "scope": 2,
                    "term": "(color_region T18 T17)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "36": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (select T41 T40 X41) (members T42 X41))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "260": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "261": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "484": {
                "goal": [
                    {
                        "clause": 5,
                        "scope": 4,
                        "term": "(members T48 T47)"
                    },
                    {
                        "clause": 6,
                        "scope": 4,
                        "term": "(members T48 T47)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "2": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "266": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(select T72 T71 X74)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T71"],
                    "free": ["X74"],
                    "exprvars": []
                }
            },
            "541": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (member T95 T94) (members T96 T94))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "542": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "268": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "543": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(member T95 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "500": {
                "goal": [{
                    "clause": 6,
                    "scope": 4,
                    "term": "(members T48 T47)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            },
            "544": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(members T101 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "6": {
                "goal": [
                    {
                        "clause": 0,
                        "scope": 1,
                        "term": "(color_map T1 T2)"
                    },
                    {
                        "clause": 1,
                        "scope": 1,
                        "term": "(color_map T1 T2)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "545": {
                "goal": [
                    {
                        "clause": 7,
                        "scope": 5,
                        "term": "(member T95 T94)"
                    },
                    {
                        "clause": 8,
                        "scope": 5,
                        "term": "(member T95 T94)"
                    }
                ],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "622": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "546": {
                "goal": [{
                    "clause": 7,
                    "scope": 5,
                    "term": "(member T95 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "623": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "547": {
                "goal": [{
                    "clause": 8,
                    "scope": 5,
                    "term": "(member T95 T94)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T94"],
                    "free": [],
                    "exprvars": []
                }
            },
            "624": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "9": {
                "goal": [{
                    "clause": 0,
                    "scope": 1,
                    "term": "(color_map T1 T2)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T2"],
                    "free": [],
                    "exprvars": []
                }
            },
            "548": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "628": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(true)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "629": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "20": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(',' (color_region T18 T17) (color_map T19 T17))"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T17"],
                    "free": [],
                    "exprvars": []
                }
            },
            "64": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(select T41 T40 X41)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T40"],
                    "free": ["X41"],
                    "exprvars": []
                }
            },
            "21": {
                "goal": [],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": [],
                    "free": [],
                    "exprvars": []
                }
            },
            "65": {
                "goal": [{
                    "clause": -1,
                    "scope": -1,
                    "term": "(members T48 T47)"
                }],
                "kb": {
                    "nonunifying": [],
                    "intvars": {},
                    "arithmetic": {
                        "type": "PlainIntegerRelationState",
                        "relations": []
                    },
                    "ground": ["T47"],
                    "free": [],
                    "exprvars": []
                }
            }
        },
        "edges": [
            {
                "from": 2,
                "to": 6,
                "label": "CASE"
            },
            {
                "from": 6,
                "to": 9,
                "label": "PARALLEL"
            },
            {
                "from": 6,
                "to": 10,
                "label": "PARALLEL"
            },
            {
                "from": 9,
                "to": 20,
                "label": "EVAL with clause\ncolor_map(l(X15, X16), X17) :- ','(color_region(X15, X17), color_map(X16, X17)).\nand substitutionX15 -> T18,\nX16 -> T19,\nT1 -> l(T18, T19),\nT2 -> T17,\nX17 -> T17,\nT15 -> T18,\nT16 -> T19"
            },
            {
                "from": 9,
                "to": 21,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 10,
                "to": 628,
                "label": "EVAL with clause\ncolor_map(nil, X139).\nand substitutionT1 -> nil,\nT2 -> T141,\nX139 -> T141"
            },
            {
                "from": 10,
                "to": 629,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 20,
                "to": 24,
                "label": "SPLIT 1"
            },
            {
                "from": 20,
                "to": 25,
                "label": "SPLIT 2\nnew knowledge:\nT17 is ground\nreplacements:T19 -> T24"
            },
            {
                "from": 24,
                "to": 34,
                "label": "CASE"
            },
            {
                "from": 25,
                "to": 2,
                "label": "INSTANCE with matching:\nT1 -> T24\nT2 -> T17"
            },
            {
                "from": 34,
                "to": 36,
                "label": "EVAL with clause\ncolor_region(region(X37, X38, X39), X40) :- ','(select(X38, X40, X41), members(X39, X41)).\nand substitutionX37 -> T37,\nX38 -> T41,\nX39 -> T42,\nT18 -> region(T37, T41, T42),\nT17 -> T40,\nX40 -> T40,\nT38 -> T41,\nT39 -> T42"
            },
            {
                "from": 34,
                "to": 50,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 36,
                "to": 64,
                "label": "SPLIT 1"
            },
            {
                "from": 36,
                "to": 65,
                "label": "SPLIT 2\nnew knowledge:\nT41 is ground\nT40 is ground\nT47 is ground\nreplacements:X41 -> T47,\nT42 -> T48"
            },
            {
                "from": 64,
                "to": 68,
                "label": "CASE"
            },
            {
                "from": 65,
                "to": 484,
                "label": "CASE"
            },
            {
                "from": 68,
                "to": 134,
                "label": "PARALLEL"
            },
            {
                "from": 68,
                "to": 139,
                "label": "PARALLEL"
            },
            {
                "from": 134,
                "to": 259,
                "label": "EVAL with clause\nselect(X58, .(X58, X59), X59).\nand substitutionT41 -> T61,\nX58 -> T61,\nX59 -> T62,\nT40 -> .(T61, T62),\nX41 -> T62"
            },
            {
                "from": 134,
                "to": 260,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 139,
                "to": 266,
                "label": "EVAL with clause\nselect(X70, .(X71, X72), .(X71, X73)) :- select(X70, X72, X73).\nand substitutionT41 -> T72,\nX70 -> T72,\nX71 -> T70,\nX72 -> T71,\nT40 -> .(T70, T71),\nX73 -> X74,\nX41 -> .(T70, X74),\nT69 -> T72"
            },
            {
                "from": 139,
                "to": 268,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 259,
                "to": 261,
                "label": "SUCCESS"
            },
            {
                "from": 266,
                "to": 64,
                "label": "INSTANCE with matching:\nT41 -> T72\nT40 -> T71\nX41 -> X74"
            },
            {
                "from": 484,
                "to": 499,
                "label": "PARALLEL"
            },
            {
                "from": 484,
                "to": 500,
                "label": "PARALLEL"
            },
            {
                "from": 499,
                "to": 541,
                "label": "EVAL with clause\nmembers(.(X94, X95), X96) :- ','(member(X94, X96), members(X95, X96)).\nand substitutionX94 -> T95,\nX95 -> T96,\nT48 -> .(T95, T96),\nT47 -> T94,\nX96 -> T94,\nT92 -> T95,\nT93 -> T96"
            },
            {
                "from": 499,
                "to": 542,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 500,
                "to": 622,
                "label": "EVAL with clause\nmembers([], X133).\nand substitutionT48 -> [],\nT47 -> T135,\nX133 -> T135"
            },
            {
                "from": 500,
                "to": 623,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 541,
                "to": 543,
                "label": "SPLIT 1"
            },
            {
                "from": 541,
                "to": 544,
                "label": "SPLIT 2\nnew knowledge:\nT95 is ground\nT94 is ground\nreplacements:T96 -> T101"
            },
            {
                "from": 543,
                "to": 545,
                "label": "CASE"
            },
            {
                "from": 544,
                "to": 65,
                "label": "INSTANCE with matching:\nT48 -> T101\nT47 -> T94"
            },
            {
                "from": 545,
                "to": 546,
                "label": "PARALLEL"
            },
            {
                "from": 545,
                "to": 547,
                "label": "PARALLEL"
            },
            {
                "from": 546,
                "to": 548,
                "label": "EVAL with clause\nmember(X113, .(X113, X114)).\nand substitutionT95 -> T114,\nX113 -> T114,\nX114 -> T115,\nT94 -> .(T114, T115)"
            },
            {
                "from": 546,
                "to": 551,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 547,
                "to": 553,
                "label": "EVAL with clause\nmember(X121, .(X122, X123)) :- member(X121, X123).\nand substitutionT95 -> T125,\nX121 -> T125,\nX122 -> T123,\nX123 -> T124,\nT94 -> .(T123, T124),\nT122 -> T125"
            },
            {
                "from": 547,
                "to": 554,
                "label": "EVAL-BACKTRACK"
            },
            {
                "from": 548,
                "to": 552,
                "label": "SUCCESS"
            },
            {
                "from": 553,
                "to": 543,
                "label": "INSTANCE with matching:\nT95 -> T125\nT94 -> T124"
            },
            {
                "from": 622,
                "to": 624,
                "label": "SUCCESS"
            },
            {
                "from": 628,
                "to": 630,
                "label": "SUCCESS"
            }
        ],
        "type": "Graph"
    }
}

----------------------------------------

(130)
Complex Obligation (AND)

----------------------------------------

(131)
Obligation:
Rules:
f547_out(T94) -> f545_out(T94) :|: TRUE
f545_in(x) -> f546_in(x) :|: TRUE
f546_out(x1) -> f545_out(x1) :|: TRUE
f545_in(x2) -> f547_in(x2) :|: TRUE
f553_in(T124) -> f543_in(T124) :|: TRUE
f543_out(x3) -> f553_out(x3) :|: TRUE
f545_out(x4) -> f543_out(x4) :|: TRUE
f543_in(x5) -> f545_in(x5) :|: TRUE
f547_in(.(x6, x7)) -> f553_in(x7) :|: TRUE
f553_out(x8) -> f547_out(.(x9, x8)) :|: TRUE
f554_out -> f547_out(x10) :|: TRUE
f547_in(x11) -> f554_in :|: TRUE
f2_in(T2) -> f6_in(T2) :|: TRUE
f6_out(x12) -> f2_out(x12) :|: TRUE
f6_in(x13) -> f10_in(x13) :|: TRUE
f6_in(x14) -> f9_in(x14) :|: TRUE
f9_out(x15) -> f6_out(x15) :|: TRUE
f10_out(x16) -> f6_out(x16) :|: TRUE
f21_out -> f9_out(x17) :|: TRUE
f20_out(T17) -> f9_out(T17) :|: TRUE
f9_in(x18) -> f21_in :|: TRUE
f9_in(x19) -> f20_in(x19) :|: TRUE
f25_out(x20) -> f20_out(x20) :|: TRUE
f20_in(x21) -> f24_in(x21) :|: TRUE
f24_out(x22) -> f25_in(x22) :|: TRUE
f34_out(x23) -> f24_out(x23) :|: TRUE
f24_in(x24) -> f34_in(x24) :|: TRUE
f34_in(x25) -> f50_in :|: TRUE
f34_in(T40) -> f36_in(T40) :|: TRUE
f36_out(x26) -> f34_out(x26) :|: TRUE
f50_out -> f34_out(x27) :|: TRUE
f65_out(x28) -> f36_out(x29) :|: TRUE
f64_out(x30) -> f65_in(x31) :|: TRUE
f36_in(x32) -> f64_in(x32) :|: TRUE
f484_out(T47) -> f65_out(T47) :|: TRUE
f65_in(x33) -> f484_in(x33) :|: TRUE
f500_out(x34) -> f484_out(x34) :|: TRUE
f499_out(x35) -> f484_out(x35) :|: TRUE
f484_in(x36) -> f499_in(x36) :|: TRUE
f484_in(x37) -> f500_in(x37) :|: TRUE
f499_in(x38) -> f542_in :|: TRUE
f499_in(x39) -> f541_in(x39) :|: TRUE
f541_out(x40) -> f499_out(x40) :|: TRUE
f542_out -> f499_out(x41) :|: TRUE
f543_out(x42) -> f544_in(x42) :|: TRUE
f541_in(x43) -> f543_in(x43) :|: TRUE
f544_out(x44) -> f541_out(x44) :|: TRUE
Start term: f2_in(T2)

----------------------------------------

(132) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:


----------------------------------------

(133)
TRUE

----------------------------------------

(134)
Obligation:
Rules:
f547_out(T94) -> f545_out(T94) :|: TRUE
f545_in(x) -> f546_in(x) :|: TRUE
f546_out(x1) -> f545_out(x1) :|: TRUE
f545_in(x2) -> f547_in(x2) :|: TRUE
f543_out(x3) -> f544_in(x3) :|: TRUE
f541_in(x4) -> f543_in(x4) :|: TRUE
f544_out(x5) -> f541_out(x5) :|: TRUE
f544_in(x6) -> f65_in(x6) :|: TRUE
f65_out(x7) -> f544_out(x7) :|: TRUE
f545_out(x8) -> f543_out(x8) :|: TRUE
f543_in(x9) -> f545_in(x9) :|: TRUE
f547_in(.(T123, T124)) -> f553_in(T124) :|: TRUE
f553_out(x10) -> f547_out(.(x11, x10)) :|: TRUE
f554_out -> f547_out(x12) :|: TRUE
f547_in(x13) -> f554_in :|: TRUE
f548_out -> f546_out(.(T114, T115)) :|: TRUE
f551_out -> f546_out(x14) :|: TRUE
f546_in(x15) -> f551_in :|: TRUE
f546_in(.(x16, x17)) -> f548_in :|: TRUE
f548_in -> f548_out :|: TRUE
f499_in(T47) -> f542_in :|: TRUE
f499_in(x18) -> f541_in(x18) :|: TRUE
f541_out(x19) -> f499_out(x19) :|: TRUE
f542_out -> f499_out(x20) :|: TRUE
f484_out(x21) -> f65_out(x21) :|: TRUE
f65_in(x22) -> f484_in(x22) :|: TRUE
f500_out(x23) -> f484_out(x23) :|: TRUE
f499_out(x24) -> f484_out(x24) :|: TRUE
f484_in(x25) -> f499_in(x25) :|: TRUE
f484_in(x26) -> f500_in(x26) :|: TRUE
f553_in(x27) -> f543_in(x27) :|: TRUE
f543_out(x28) -> f553_out(x28) :|: TRUE
f2_in(T2) -> f6_in(T2) :|: TRUE
f6_out(x29) -> f2_out(x29) :|: TRUE
f6_in(x30) -> f10_in(x30) :|: TRUE
f6_in(x31) -> f9_in(x31) :|: TRUE
f9_out(x32) -> f6_out(x32) :|: TRUE
f10_out(x33) -> f6_out(x33) :|: TRUE
f21_out -> f9_out(x34) :|: TRUE
f20_out(T17) -> f9_out(T17) :|: TRUE
f9_in(x35) -> f21_in :|: TRUE
f9_in(x36) -> f20_in(x36) :|: TRUE
f25_out(x37) -> f20_out(x37) :|: TRUE
f20_in(x38) -> f24_in(x38) :|: TRUE
f24_out(x39) -> f25_in(x39) :|: TRUE
f34_out(x40) -> f24_out(x40) :|: TRUE
f24_in(x41) -> f34_in(x41) :|: TRUE
f34_in(x42) -> f50_in :|: TRUE
f34_in(T40) -> f36_in(T40) :|: TRUE
f36_out(x43) -> f34_out(x43) :|: TRUE
f50_out -> f34_out(x44) :|: TRUE
f65_out(x45) -> f36_out(x46) :|: TRUE
f64_out(x47) -> f65_in(x48) :|: TRUE
f36_in(x49) -> f64_in(x49) :|: TRUE
Start term: f2_in(T2)

----------------------------------------

(135) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:


----------------------------------------

(136)
TRUE

----------------------------------------

(137)
Obligation:
Rules:
f134_out(T40) -> f68_out(T40) :|: TRUE
f68_in(x) -> f139_in(x) :|: TRUE
f139_out(x1) -> f68_out(x1) :|: TRUE
f68_in(x2) -> f134_in(x2) :|: TRUE
f268_out -> f139_out(x3) :|: TRUE
f266_out(T71) -> f139_out(.(T70, T71)) :|: TRUE
f139_in(x4) -> f268_in :|: TRUE
f139_in(.(x5, x6)) -> f266_in(x6) :|: TRUE
f266_in(x7) -> f64_in(x7) :|: TRUE
f64_out(x8) -> f266_out(x8) :|: TRUE
f68_out(x9) -> f64_out(x9) :|: TRUE
f64_in(x10) -> f68_in(x10) :|: TRUE
f2_in(T2) -> f6_in(T2) :|: TRUE
f6_out(x11) -> f2_out(x11) :|: TRUE
f6_in(x12) -> f10_in(x12) :|: TRUE
f6_in(x13) -> f9_in(x13) :|: TRUE
f9_out(x14) -> f6_out(x14) :|: TRUE
f10_out(x15) -> f6_out(x15) :|: TRUE
f21_out -> f9_out(x16) :|: TRUE
f20_out(T17) -> f9_out(T17) :|: TRUE
f9_in(x17) -> f21_in :|: TRUE
f9_in(x18) -> f20_in(x18) :|: TRUE
f25_out(x19) -> f20_out(x19) :|: TRUE
f20_in(x20) -> f24_in(x20) :|: TRUE
f24_out(x21) -> f25_in(x21) :|: TRUE
f34_out(x22) -> f24_out(x22) :|: TRUE
f24_in(x23) -> f34_in(x23) :|: TRUE
f34_in(x24) -> f50_in :|: TRUE
f34_in(x25) -> f36_in(x25) :|: TRUE
f36_out(x26) -> f34_out(x26) :|: TRUE
f50_out -> f34_out(x27) :|: TRUE
f65_out(x28) -> f36_out(x29) :|: TRUE
f64_out(x30) -> f65_in(x31) :|: TRUE
f36_in(x32) -> f64_in(x32) :|: TRUE
Start term: f2_in(T2)

----------------------------------------

(138) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:

intTRSProblem:
f68_in(x) -> f139_in(x) :|: TRUE
f139_in(.(x5, x6)) -> f266_in(x6) :|: TRUE
f266_in(x7) -> f64_in(x7) :|: TRUE
f64_in(x10) -> f68_in(x10) :|: TRUE


----------------------------------------

(139)
Obligation:
Rules:
f68_in(x) -> f139_in(x) :|: TRUE
f139_in(.(x5, x6)) -> f266_in(x6) :|: TRUE
f266_in(x7) -> f64_in(x7) :|: TRUE
f64_in(x10) -> f68_in(x10) :|: TRUE

----------------------------------------

(140) IntTRSCompressionProof (EQUIVALENT)
Compressed rules.
----------------------------------------

(141)
Obligation:
Rules:
f68_in(.(x5:0, x6:0)) -> f68_in(x6:0) :|: TRUE

----------------------------------------

(142) IRSFormatTransformerProof (EQUIVALENT)
Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %).
----------------------------------------

(143)
Obligation:
Rules:
f68_in(.(x5:0, x6:0)) -> f68_in(x6:0) :|: TRUE

----------------------------------------

(144) IRSwTTerminationDigraphProof (EQUIVALENT)
Constructed termination digraph!
Nodes:
(1) f68_in(.(x5:0, x6:0)) -> f68_in(x6:0) :|: TRUE

Arcs:
(1) -> (1)

This digraph is fully evaluated!
----------------------------------------

(145)
Obligation:

Termination digraph:
Nodes:
(1) f68_in(.(x5:0, x6:0)) -> f68_in(x6:0) :|: TRUE

Arcs:
(1) -> (1)

This digraph is fully evaluated!

----------------------------------------

(146) IntTRSUnneededArgumentFilterProof (EQUIVALENT)
Some arguments are removed because they cannot influence termination. We removed arguments according to the following replacements:

   .(x1, x2) -> .(x2)

----------------------------------------

(147)
Obligation:
Rules:
f68_in(.(x6:0)) -> f68_in(x6:0) :|: TRUE

----------------------------------------

(148) TempFilterProof (SOUND)
Used the following sort dictionary for filtering: 
f68_in(VARIABLE)
.(VARIABLE)
Removed predefined arithmetic.
----------------------------------------

(149)
Obligation:
Rules:
f68_in(.(x6:0)) -> f68_in(x6:0)

----------------------------------------

(150) IRSwTToQDPProof (SOUND)
Removed the integers and created a QDP-Problem.
----------------------------------------

(151)
Obligation:
Q DP problem:
The TRS P consists of the following rules:

   f68_in(.(x6:0)) -> f68_in(x6:0)

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

(152) QDPSizeChangeProof (EQUIVALENT)
By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem. 

From the DPs we obtained the following set of size-change graphs:
*f68_in(.(x6:0)) -> f68_in(x6:0)
The graph contains the following edges 1 > 1


----------------------------------------

(153)
YES

----------------------------------------

(154)
Obligation:
Rules:
f547_out(T94) -> f545_out(T94) :|: TRUE
f545_in(x) -> f546_in(x) :|: TRUE
f546_out(x1) -> f545_out(x1) :|: TRUE
f545_in(x2) -> f547_in(x2) :|: TRUE
f34_in(T17) -> f50_in :|: TRUE
f34_in(T40) -> f36_in(T40) :|: TRUE
f36_out(x3) -> f34_out(x3) :|: TRUE
f50_out -> f34_out(x4) :|: TRUE
f259_in -> f259_out :|: TRUE
f21_out -> f9_out(T2) :|: TRUE
f20_out(x5) -> f9_out(x5) :|: TRUE
f9_in(x6) -> f21_in :|: TRUE
f9_in(x7) -> f20_in(x7) :|: TRUE
f268_out -> f139_out(x8) :|: TRUE
f266_out(T71) -> f139_out(.(T70, T71)) :|: TRUE
f139_in(x9) -> f268_in :|: TRUE
f139_in(.(x10, x11)) -> f266_in(x11) :|: TRUE
f266_in(x12) -> f64_in(x12) :|: TRUE
f64_out(x13) -> f266_out(x13) :|: TRUE
f34_out(x14) -> f24_out(x14) :|: TRUE
f24_in(x15) -> f34_in(x15) :|: TRUE
f484_out(T47) -> f65_out(T47) :|: TRUE
f65_in(x16) -> f484_in(x16) :|: TRUE
f499_in(x17) -> f542_in :|: TRUE
f499_in(x18) -> f541_in(x18) :|: TRUE
f541_out(x19) -> f499_out(x19) :|: TRUE
f542_out -> f499_out(x20) :|: TRUE
f500_out(x21) -> f484_out(x21) :|: TRUE
f499_out(x22) -> f484_out(x22) :|: TRUE
f484_in(x23) -> f499_in(x23) :|: TRUE
f484_in(x24) -> f500_in(x24) :|: TRUE
f553_in(T124) -> f543_in(T124) :|: TRUE
f543_out(x25) -> f553_out(x25) :|: TRUE
f134_out(x26) -> f68_out(x26) :|: TRUE
f68_in(x27) -> f139_in(x27) :|: TRUE
f139_out(x28) -> f68_out(x28) :|: TRUE
f68_in(x29) -> f134_in(x29) :|: TRUE
f2_out(x30) -> f25_out(x30) :|: TRUE
f25_in(x31) -> f2_in(x31) :|: TRUE
f543_out(x32) -> f544_in(x32) :|: TRUE
f541_in(x33) -> f543_in(x33) :|: TRUE
f544_out(x34) -> f541_out(x34) :|: TRUE
f260_out -> f134_out(x35) :|: TRUE
f134_in(.(T61, T62)) -> f259_in :|: TRUE
f259_out -> f134_out(.(x36, x37)) :|: TRUE
f134_in(x38) -> f260_in :|: TRUE
f544_in(x39) -> f65_in(x39) :|: TRUE
f65_out(x40) -> f544_out(x40) :|: TRUE
f545_out(x41) -> f543_out(x41) :|: TRUE
f543_in(x42) -> f545_in(x42) :|: TRUE
f68_out(x43) -> f64_out(x43) :|: TRUE
f64_in(x44) -> f68_in(x44) :|: TRUE
f622_in -> f622_out :|: TRUE
f547_in(.(x45, x46)) -> f553_in(x46) :|: TRUE
f553_out(x47) -> f547_out(.(x48, x47)) :|: TRUE
f554_out -> f547_out(x49) :|: TRUE
f547_in(x50) -> f554_in :|: TRUE
f548_out -> f546_out(.(T114, T115)) :|: TRUE
f551_out -> f546_out(x51) :|: TRUE
f546_in(x52) -> f551_in :|: TRUE
f546_in(.(x53, x54)) -> f548_in :|: TRUE
f2_in(x55) -> f6_in(x55) :|: TRUE
f6_out(x56) -> f2_out(x56) :|: TRUE
f65_out(x57) -> f36_out(x58) :|: TRUE
f64_out(x59) -> f65_in(x60) :|: TRUE
f36_in(x61) -> f64_in(x61) :|: TRUE
f6_in(x62) -> f10_in(x62) :|: TRUE
f6_in(x63) -> f9_in(x63) :|: TRUE
f9_out(x64) -> f6_out(x64) :|: TRUE
f10_out(x65) -> f6_out(x65) :|: TRUE
f548_in -> f548_out :|: TRUE
f500_in(x66) -> f623_in :|: TRUE
f623_out -> f500_out(x67) :|: TRUE
f622_out -> f500_out(T135) :|: TRUE
f500_in(x68) -> f622_in :|: TRUE
f25_out(x69) -> f20_out(x69) :|: TRUE
f20_in(x70) -> f24_in(x70) :|: TRUE
f24_out(x71) -> f25_in(x71) :|: TRUE
Start term: f2_in(T2)

----------------------------------------

(155) IRSwTSimpleDependencyGraphProof (EQUIVALENT)
Constructed simple dependency graph.

Simplified to the following IRSwTs:

intTRSProblem:
f547_out(T94) -> f545_out(T94) :|: TRUE
f545_in(x) -> f546_in(x) :|: TRUE
f546_out(x1) -> f545_out(x1) :|: TRUE
f545_in(x2) -> f547_in(x2) :|: TRUE
f34_in(T40) -> f36_in(T40) :|: TRUE
f36_out(x3) -> f34_out(x3) :|: TRUE
f259_in -> f259_out :|: TRUE
f9_in(x7) -> f20_in(x7) :|: TRUE
f266_out(T71) -> f139_out(.(T70, T71)) :|: TRUE
f139_in(.(x10, x11)) -> f266_in(x11) :|: TRUE
f266_in(x12) -> f64_in(x12) :|: TRUE
f64_out(x13) -> f266_out(x13) :|: TRUE
f34_out(x14) -> f24_out(x14) :|: TRUE
f24_in(x15) -> f34_in(x15) :|: TRUE
f484_out(T47) -> f65_out(T47) :|: TRUE
f65_in(x16) -> f484_in(x16) :|: TRUE
f499_in(x18) -> f541_in(x18) :|: TRUE
f541_out(x19) -> f499_out(x19) :|: TRUE
f500_out(x21) -> f484_out(x21) :|: TRUE
f499_out(x22) -> f484_out(x22) :|: TRUE
f484_in(x23) -> f499_in(x23) :|: TRUE
f484_in(x24) -> f500_in(x24) :|: TRUE
f553_in(T124) -> f543_in(T124) :|: TRUE
f543_out(x25) -> f553_out(x25) :|: TRUE
f134_out(x26) -> f68_out(x26) :|: TRUE
f68_in(x27) -> f139_in(x27) :|: TRUE
f139_out(x28) -> f68_out(x28) :|: TRUE
f68_in(x29) -> f134_in(x29) :|: TRUE
f25_in(x31) -> f2_in(x31) :|: TRUE
f543_out(x32) -> f544_in(x32) :|: TRUE
f541_in(x33) -> f543_in(x33) :|: TRUE
f544_out(x34) -> f541_out(x34) :|: TRUE
f134_in(.(T61, T62)) -> f259_in :|: TRUE
f259_out -> f134_out(.(x36, x37)) :|: TRUE
f544_in(x39) -> f65_in(x39) :|: TRUE
f65_out(x40) -> f544_out(x40) :|: TRUE
f545_out(x41) -> f543_out(x41) :|: TRUE
f543_in(x42) -> f545_in(x42) :|: TRUE
f68_out(x43) -> f64_out(x43) :|: TRUE
f64_in(x44) -> f68_in(x44) :|: TRUE
f622_in -> f622_out :|: TRUE
f547_in(.(x45, x46)) -> f553_in(x46) :|: TRUE
f553_out(x47) -> f547_out(.(x48, x47)) :|: TRUE
f548_out -> f546_out(.(T114, T115)) :|: TRUE
f546_in(.(x53, x54)) -> f548_in :|: TRUE
f2_in(x55) -> f6_in(x55) :|: TRUE
f65_out(x57) -> f36_out(x58) :|: TRUE
f64_out(x59) -> f65_in(x60) :|: TRUE
f36_in(x61) -> f64_in(x61) :|: TRUE
f6_in(x63) -> f9_in(x63) :|: TRUE
f548_in -> f548_out :|: TRUE
f622_out -> f500_out(T135) :|: TRUE
f500_in(x68) -> f622_in :|: TRUE
f20_in(x70) -> f24_in(x70) :|: TRUE
f24_out(x71) -> f25_in(x71) :|: TRUE


----------------------------------------

(156)
Obligation:
Rules:
f547_out(T94) -> f545_out(T94) :|: TRUE
f545_in(x) -> f546_in(x) :|: TRUE
f546_out(x1) -> f545_out(x1) :|: TRUE
f545_in(x2) -> f547_in(x2) :|: TRUE
f34_in(T40) -> f36_in(T40) :|: TRUE
f36_out(x3) -> f34_out(x3) :|: TRUE
f259_in -> f259_out :|: TRUE
f9_in(x7) -> f20_in(x7) :|: TRUE
f266_out(T71) -> f139_out(.(T70, T71)) :|: TRUE
f139_in(.(x10, x11)) -> f266_in(x11) :|: TRUE
f266_in(x12) -> f64_in(x12) :|: TRUE
f64_out(x13) -> f266_out(x13) :|: TRUE
f34_out(x14) -> f24_out(x14) :|: TRUE
f24_in(x15) -> f34_in(x15) :|: TRUE
f484_out(T47) -> f65_out(T47) :|: TRUE
f65_in(x16) -> f484_in(x16) :|: TRUE
f499_in(x18) -> f541_in(x18) :|: TRUE
f541_out(x19) -> f499_out(x19) :|: TRUE
f500_out(x21) -> f484_out(x21) :|: TRUE
f499_out(x22) -> f484_out(x22) :|: TRUE
f484_in(x23) -> f499_in(x23) :|: TRUE
f484_in(x24) -> f500_in(x24) :|: TRUE
f553_in(T124) -> f543_in(T124) :|: TRUE
f543_out(x25) -> f553_out(x25) :|: TRUE
f134_out(x26) -> f68_out(x26) :|: TRUE
f68_in(x27) -> f139_in(x27) :|: TRUE
f139_out(x28) -> f68_out(x28) :|: TRUE
f68_in(x29) -> f134_in(x29) :|: TRUE
f25_in(x31) -> f2_in(x31) :|: TRUE
f543_out(x32) -> f544_in(x32) :|: TRUE
f541_in(x33) -> f543_in(x33) :|: TRUE
f544_out(x34) -> f541_out(x34) :|: TRUE
f134_in(.(T61, T62)) -> f259_in :|: TRUE
f259_out -> f134_out(.(x36, x37)) :|: TRUE
f544_in(x39) -> f65_in(x39) :|: TRUE
f65_out(x40) -> f544_out(x40) :|: TRUE
f545_out(x41) -> f543_out(x41) :|: TRUE
f543_in(x42) -> f545_in(x42) :|: TRUE
f68_out(x43) -> f64_out(x43) :|: TRUE
f64_in(x44) -> f68_in(x44) :|: TRUE
f622_in -> f622_out :|: TRUE
f547_in(.(x45, x46)) -> f553_in(x46) :|: TRUE
f553_out(x47) -> f547_out(.(x48, x47)) :|: TRUE
f548_out -> f546_out(.(T114, T115)) :|: TRUE
f546_in(.(x53, x54)) -> f548_in :|: TRUE
f2_in(x55) -> f6_in(x55) :|: TRUE
f65_out(x57) -> f36_out(x58) :|: TRUE
f64_out(x59) -> f65_in(x60) :|: TRUE
f36_in(x61) -> f64_in(x61) :|: TRUE
f6_in(x63) -> f9_in(x63) :|: TRUE
f548_in -> f548_out :|: TRUE
f622_out -> f500_out(T135) :|: TRUE
f500_in(x68) -> f622_in :|: TRUE
f20_in(x70) -> f24_in(x70) :|: TRUE
f24_out(x71) -> f25_in(x71) :|: TRUE

----------------------------------------

(157) IntTRSCompressionProof (EQUIVALENT)
Compressed rules.
----------------------------------------

(158)
Obligation:
Rules:
f68_in(.(x10:0, x11:0)) -> f68_in(x11:0) :|: TRUE
f68_in(.(T61:0, T62:0)) -> f64_out(.(x36:0, x37:0)) :|: TRUE
f543_out(x32:0) -> f65_in(x32:0) :|: TRUE
f64_out(x13:0) -> f64_out(.(T70:0, x13:0)) :|: TRUE
f484_out(T47:0) -> f68_in(x58:0) :|: TRUE
f543_out(x25:0) -> f543_out(.(x48:0, x25:0)) :|: TRUE
f65_in(x16:0) -> f484_out(T135:0) :|: TRUE
f64_out(x59:0) -> f65_in(x60:0) :|: TRUE
f545_in(.(x53:0, x54:0)) -> f543_out(.(T114:0, T115:0)) :|: TRUE
f545_in(.(x45:0, x46:0)) -> f545_in(x46:0) :|: TRUE
f65_in(x) -> f545_in(x) :|: TRUE
f484_out(x1) -> f484_out(x1) :|: TRUE

----------------------------------------

(159) IRSFormatTransformerProof (EQUIVALENT)
Reformatted IRS to match normalized format (transformed away non-linear left-hand sides, !=, / and %).
----------------------------------------

(160)
Obligation:
Rules:
f68_in(.(x10:0, x11:0)) -> f68_in(x11:0) :|: TRUE
f68_in(.(T61:0, T62:0)) -> f64_out(.(x36:0, x37:0)) :|: TRUE
f543_out(x32:0) -> f65_in(x32:0) :|: TRUE
f64_out(x13:0) -> f64_out(.(T70:0, x13:0)) :|: TRUE
f484_out(T47:0) -> f68_in(x58:0) :|: TRUE
f543_out(x25:0) -> f543_out(.(x48:0, x25:0)) :|: TRUE
f65_in(x16:0) -> f484_out(T135:0) :|: TRUE
f64_out(x59:0) -> f65_in(x60:0) :|: TRUE
f545_in(.(x53:0, x54:0)) -> f543_out(.(T114:0, T115:0)) :|: TRUE
f545_in(.(x45:0, x46:0)) -> f545_in(x46:0) :|: TRUE
f65_in(x) -> f545_in(x) :|: TRUE
f484_out(x1) -> f484_out(x1) :|: TRUE

----------------------------------------

(161) IRSwTTerminationDigraphProof (EQUIVALENT)
Constructed termination digraph!
Nodes:
(1) f68_in(.(x10:0, x11:0)) -> f68_in(x11:0) :|: TRUE
(2) f68_in(.(T61:0, T62:0)) -> f64_out(.(x36:0, x37:0)) :|: TRUE
(3) f543_out(x32:0) -> f65_in(x32:0) :|: TRUE
(4) f64_out(x13:0) -> f64_out(.(T70:0, x13:0)) :|: TRUE
(5) f484_out(T47:0) -> f68_in(x58:0) :|: TRUE
(6) f543_out(x25:0) -> f543_out(.(x48:0, x25:0)) :|: TRUE
(7) f65_in(x16:0) -> f484_out(T135:0) :|: TRUE
(8) f64_out(x59:0) -> f65_in(x60:0) :|: TRUE
(9) f545_in(.(x53:0, x54:0)) -> f543_out(.(T114:0, T115:0)) :|: TRUE
(10) f545_in(.(x45:0, x46:0)) -> f545_in(x46:0) :|: TRUE
(11) f65_in(x) -> f545_in(x) :|: TRUE
(12) f484_out(x1) -> f484_out(x1) :|: TRUE

Arcs:
(1) -> (1), (2)
(2) -> (4), (8)
(3) -> (7), (11)
(4) -> (4), (8)
(5) -> (1), (2)
(6) -> (3), (6)
(7) -> (5), (12)
(8) -> (7), (11)
(9) -> (3), (6)
(10) -> (9), (10)
(11) -> (9), (10)
(12) -> (5), (12)

This digraph is fully evaluated!
----------------------------------------

(162)
Obligation:

Termination digraph:
Nodes:
(1) f68_in(.(x10:0, x11:0)) -> f68_in(x11:0) :|: TRUE
(2) f484_out(T47:0) -> f68_in(x58:0) :|: TRUE
(3) f484_out(x1) -> f484_out(x1) :|: TRUE
(4) f65_in(x16:0) -> f484_out(T135:0) :|: TRUE
(5) f543_out(x32:0) -> f65_in(x32:0) :|: TRUE
(6) f543_out(x25:0) -> f543_out(.(x48:0, x25:0)) :|: TRUE
(7) f545_in(.(x53:0, x54:0)) -> f543_out(.(T114:0, T115:0)) :|: TRUE
(8) f545_in(.(x45:0, x46:0)) -> f545_in(x46:0) :|: TRUE
(9) f65_in(x) -> f545_in(x) :|: TRUE
(10) f64_out(x59:0) -> f65_in(x60:0) :|: TRUE
(11) f64_out(x13:0) -> f64_out(.(T70:0, x13:0)) :|: TRUE
(12) f68_in(.(T61:0, T62:0)) -> f64_out(.(x36:0, x37:0)) :|: TRUE

Arcs:
(1) -> (1), (12)
(2) -> (1), (12)
(3) -> (2), (3)
(4) -> (2), (3)
(5) -> (4), (9)
(6) -> (5), (6)
(7) -> (5), (6)
(8) -> (7), (8)
(9) -> (7), (8)
(10) -> (4), (9)
(11) -> (10), (11)
(12) -> (10), (11)

This digraph is fully evaluated!

----------------------------------------

(163) IntTRSUnneededArgumentFilterProof (EQUIVALENT)
Some arguments are removed because they cannot influence termination. We removed arguments according to the following replacements:

   .(x1, x2) -> .(x2)

----------------------------------------

(164)
Obligation:
Rules:
f68_in(.(x11:0)) -> f68_in(x11:0) :|: TRUE
f484_out(T47:0) -> f68_in(x58:0) :|: TRUE
f484_out(x1) -> f484_out(x1) :|: TRUE
f65_in(x16:0) -> f484_out(T135:0) :|: TRUE
f543_out(x32:0) -> f65_in(x32:0) :|: TRUE
f543_out(x25:0) -> f543_out(.(x25:0)) :|: TRUE
f545_in(.(x54:0)) -> f543_out(.(T115:0)) :|: TRUE
f545_in(.(x46:0)) -> f545_in(x46:0) :|: TRUE
f65_in(x) -> f545_in(x) :|: TRUE
f64_out(x59:0) -> f65_in(x60:0) :|: TRUE
f64_out(x13:0) -> f64_out(.(x13:0)) :|: TRUE
f68_in(.(T62:0)) -> f64_out(.(x37:0)) :|: TRUE
